> For the complete documentation index, see [llms.txt](https://samrel-ai.gitbook.io/samrel-ai-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://samrel-ai.gitbook.io/samrel-ai-documentation/high-level-guides/development.md).

# Development

**Incremental Development**

Samrel AI allows you to iteratively improve your projects with ease. Here's how to enhance existing project code:

**Step-by-Step Process**

1. **Locate Your Project Folder**: Identify the folder containing your project created with Samrel AI on your computer.
2. **Run the Command**: Execute the following command to provide new requirements or bug fixes:

   Copy

   Copy

   ```
   samrelai "<user-requirements-described-in-natural-language>" --project-path <path-to-existing-project>
   ```

**Command Options**

You can continuously iterate on your project using the following CLI parameters:

CLI Parameter Name

Value Type

Optional/Required

Description

`--project-path`

TEXT

Optional

Specify the directory path of the project to integrate incremental changes.

`--project-name`

TEXT

Optional

Unique name for your project, e.g., `game_2048`.

Example:

Copy

Copy

```
samrelai "NEW_REQUIREMENTS" --project-name "my_project" --project-path "YOUR_PROJECT_PATH"
```

For additional options, use:

Copy

Copy

```
samrelai --help
```

***

**Demo: Incremental Development**

**Create a New Project**

To create a new project, run:

Copy

Copy

```
samrelai "Build a CLI tool for managing tasks" --project-name "task_manager" --run-tests --n-round 10
```

**Add New Requirements**

To append features or fix bugs in an existing project:

Copy

Copy

```
samrelai "Add a feature to export tasks to CSV." --project-path "/path/to/task_manager" --run-tests --n-round 10
```

**Fix Bugs**

To address specific issues in your project:

Copy

Copy

```
samrelai "Fix TypeError: 'NoneType' object is not callable" --project-path "/path/to/task_manager" --run-tests --n-round 5
```

***

**Folder Structure**

Below are key directories and files generated by Samrel AI, and how they support incremental development:

Path

Editable

Description

`.dependencies.json`

No

Stores explicit dependency relationships.

`docs/requirement.txt`

Yes

Stores new requirements for the current iteration.

`docs/bugfix.txt`

Yes

Contains bug reports to address during the current iteration.

`docs/prds/`

Yes

Detailed breakdown of project requirements.

`docs/system_designs/`

Yes

High-level system designs.

`tests/`

Yes

Unit test code.

`<workspace>`

Yes

Project source code directory.

***

**Advanced Example: Snake Game**

**Create the Snake Game**

Copy

Copy

```
samrelai "Create a snake game using Python." --project-name "snake_game" --run-tests --n-round 20
```

**Add Features**

Copy

Copy

```
samrelai "Add a randomly appearing enemy that lasts for 5 seconds." --p
```
