Repository: Pythagora-io/gpt-pilot
File: pilot/helpers/agents/Developer.py (Python)

Code before:


class Developer(Agent):
    def __init__(self, project):
        super().__init__('full_stack_developer', project)
        self.run_command = None
        self.debugger = Debugger(self)

    def start_coding(self):
        if self.project.finished:
            development_plan = self.project.feature_development_plan
        else:
            self.project.current_step = 'coding'
            development_plan = self.project.development_plan
            update_app_status(self.project.args['app_id'], self.project.current_step)

            if self.project.skip_steps is None:
                self.project.skip_steps = False if ('skip_until_dev_step' in self.project.args and self.project.args['skip_until_dev_step'] == '0') else True

        # DEVELOPMENT
        print(color_green_bold("🚀 Now for the actual development...\n"))
        logger.info("Starting to create the actual code...")

        for i, dev_task in enumerate(development_plan):
            self.implement_task(i, dev_task)

        # DEVELOPMENT END
        self.project.dot_pilot_gpt.chat_log_folder(None)
        if not self.project.finished:
            message = 'The app is DONE!!! Yay...you can use it now.\n'
            logger.info(message)
            print(color_green_bold(message))
        else:
            message = 'Feature complete!\n'
            logger.info(message)
            print(color_green_bold(message))


    def implement_task(self, i, development_task=None):
        print(color_green_bold(f'Implementing task #{i + 1}: ') + color_green(f' {development_task["description"]}\n'))
        self.project.dot_pilot_gpt.chat_log_folder(i + 1)

        convo_dev_task = AgentConvo(self)
        convo_dev_task.send_message('development/task/breakdown.prompt', {
            "name": self.project.args['name'],
            "app_type": self.project.args['app_type'],
            "app_summary": self.project.project_description,
            "clarifications": self.project.clarifications,
            "user_stories": self.project.user_stories,
            "user_tasks": self.project.user_tasks,
            "technologies": self.project.architecture,

Review comment (suggestion):
Does `project.finished` not mean what I expect it would mean?

```suggestion
        if self.project.finished:
```

Code after:


class Developer(Agent):
    def __init__(self, project):
        super().__init__('full_stack_developer', project)
        self.run_command = None
        self.debugger = Debugger(self)

    def start_coding(self):
        if not self.project.finished:
            self.project.current_step = 'coding'
            update_app_status(self.project.args['app_id'], self.project.current_step)

            if self.project.skip_steps is None:
                self.project.skip_steps = False if ('skip_until_dev_step' in self.project.args and self.project.args['skip_until_dev_step'] == '0') else True

        # DEVELOPMENT
        print(color_green_bold("🚀 Now for the actual development...\n"))
        logger.info("Starting to create the actual code...")

        for i, dev_task in enumerate(self.project.development_plan):
            self.implement_task(i, dev_task)

        # DEVELOPMENT END
        self.project.dot_pilot_gpt.chat_log_folder(None)
        if not self.project.finished:
            self.project.current_step = 'finished'
            self.project.finished = True
            update_app_status(self.project.args['app_id'], self.project.current_step)
            message = 'The app is DONE!!! Yay...you can use it now.\n'
            logger.info(message)
            print(color_green_bold(message))
        else:
            message = 'Feature complete!\n'
            logger.info(message)
            print(color_green_bold(message))


    def implement_task(self, i, development_task=None):
        print(color_green_bold(f'Implementing task #{i + 1}: ') + color_green(f' {development_task["description"]}\n'))
        self.project.dot_pilot_gpt.chat_log_folder(i + 1)

        convo_dev_task = AgentConvo(self)
        convo_dev_task.send_message('development/task/breakdown.prompt', {
            "name": self.project.args['name'],
            "app_type": self.project.args['app_type'],
            "app_summary": self.project.project_description,
            "clarifications": self.project.clarifications,
            "user_stories": self.project.user_stories,
            "user_tasks": self.project.user_tasks,
            "technologies": self.project.architecture,