Skip to content

AI Coder

Basic Clean Coder functionality - the ability to implement a task into your project. Tasks can be anything from creating a new page to fixing a bug or implementing a logic feature. Relax and watch AI codes for you!

Installation

Clone repo:

git clone https://github.com/GregorD1A1/Clean-Coder-AI

Go to directory:

cd Clean-Coder-AI

Create virtual environment and activate:

Linux/Mac:

python3 -m venv venv
source venv/bin/activate

Windows:

python -m venv venv
venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Run coding pipeline:

python single_task_coder.py

Initial set up

When running Single Task Coder for the first time, it will ask you for a few variables, which it saves in the .env file.

First, you need to provide API key(s) for your LLM provider(s). Provide at least one key for Anthropic, OpenAI, OpenRouter, or provide the name of your Ollama model if you want to work with a local LLM. However, the more keys you provide the better, as a second LLM could work as a fallback in case of main LLM shortages.

Next, you’ll be asked to provide the full path to the directory in which you want to write/modify your code.

Working process

You will be prompted to describe task Clean Coder need to execute. Write the description or enable listening and just say it.

🔥 Tips for a Good Task Description:

The same rules for creating good tasks for human programmers apply here.

  • Describe your task as detailed as you can.
  • Focus on one feature per task. Break complex features into smaller, manageable tasks.

Your task will be executed by Clean Coder agents in sequence: Researcher, Planner, Executor, and Debugger.

Agents_pipeline_illustration

Researcher Agent

Researcher examines files in the project directory and tries to identify necessary files to work on. It will take a minute.

Once complete, found files will be displayed. Accept them or provide feedback if you think Researcher missed some important files.

Planner Agent

Planner drafts code modification plans. Review and request changes until the plan is satisfactory. Don’t accept plans you don’t understand - debugging will be painful without understanding your code.

Executor Agent

Executor implements planned changes to your project files. Being based on a fast model, it completes work relatively quickly.

Debugger agent

If the Executor’s changes don’t fully solve the task, you’ll need the Debugger - a more powerful and intelligent agent that can access logs and visual feedback. Use it to polish code after the Executor’s work.

For safety, you must approve all changes. Interrupt if you see wrong changes being made. Don’t accept changes you don’t understand - again, debugging will be painful. Keep your IDE open to monitor code modifications in real-time.

Demo video


Happy coding! 😋