You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

agilecoder

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agilecoder - pypi Package Compare versions

Comparing version
0.1.4
to
0.1.5
+1
agilecoder.egg-info/dependency_links.txt
[console_scripts]
agilecoder = agilecoder:main

Sorry, the diff of this file is not supported yet

Metadata-Version: 2.1
Name: agilecoder
Version: 0.1.5
Summary: AgileCoder
Home-page: https://github.com/FSoft-AI4Code/AgileCoder
Author: FSoft-AI4Code
Author-email: support.aic@fpt.com
License: Apache-2.0
Platform: UNKNOWN
Requires-Python: >=3.8
UNKNOWN
openai==0.28.1
tiktoken
markdown
colorama
nltk
tenacity
python-dotenv
README.md
setup.py
agilecoder/__init__.py
agilecoder/cli.py
agilecoder/run.py
agilecoder/run_api.py
agilecoder/test.py
agilecoder.egg-info/PKG-INFO
agilecoder.egg-info/SOURCES.txt
agilecoder.egg-info/dependency_links.txt
agilecoder.egg-info/entry_points.txt
agilecoder.egg-info/not-zip-safe
agilecoder.egg-info/requires.txt
agilecoder.egg-info/top_level.txt
agilecoder/CompanyConfig/Agile/ChatChainConfig.json
agilecoder/CompanyConfig/Agile/PhaseConfig.json
agilecoder/CompanyConfig/Agile/RoleConfig.json
agilecoder/CompanyConfig/Art/ChatChainConfig.json
agilecoder/CompanyConfig/Default/ChatChainConfig.json
agilecoder/CompanyConfig/Default/PhaseConfig.json
agilecoder/CompanyConfig/Default/RoleConfig.json
agilecoder/camel/__init__.py
agilecoder/camel/configs.py
agilecoder/camel/dependency.py
agilecoder/camel/generators.py
agilecoder/camel/human.py
agilecoder/camel/model_backend.py
agilecoder/camel/typing.py
agilecoder/camel/utils.py
agilecoder/camel/agents/__init__.py
agilecoder/camel/agents/base.py
agilecoder/camel/agents/chat_agent.py
agilecoder/camel/agents/critic_agent.py
agilecoder/camel/agents/embodied_agent.py
agilecoder/camel/agents/role_playing.py
agilecoder/camel/agents/task_agent.py
agilecoder/camel/agents/tool_agents/__init__.py
agilecoder/camel/agents/tool_agents/base.py
agilecoder/camel/agents/tool_agents/hugging_face_tool_agent.py
agilecoder/camel/messages/__init__.py
agilecoder/camel/messages/base.py
agilecoder/camel/messages/chat_messages.py
agilecoder/camel/messages/system_messages.py
agilecoder/camel/prompts/__init__.py
agilecoder/camel/prompts/base.py
agilecoder/camel/prompts/prompt_templates.py
agilecoder/camel/prompts/task_prompt_template.py
agilecoder/components/__init__.py
agilecoder/components/chat_chain.py
agilecoder/components/chat_env.py
agilecoder/components/codes.py
agilecoder/components/composed_phase.py
agilecoder/components/documents.py
agilecoder/components/phase.py
agilecoder/components/roster.py
agilecoder/components/statistics.py
agilecoder/components/utils.py
agilecoder/online_log/__init__.py
agilecoder/online_log/app.py
import ast
import os
def extract_imports(filename):
"""Extract import statements from a Python source file."""
with open(filename, 'r') as file:
tree = ast.parse(file.read(), filename=filename)
imports = []
for node in ast.walk(tree):
if isinstance(node, ast.Import):
for alias in node.names:
imports.append(alias.name)
elif isinstance(node, ast.ImportFrom):
imports.append(node.module)
return imports
def build_dependency_graph(directory):
"""Build a dependency graph for Python files in a directory."""
graph = {}
all_files = os.listdir(directory)
all_modules = set(list(map(lambda x: x.replace(".py", ""), all_files)))
for root, _, files in os.walk(directory):
for file in files:
if file.endswith('.py'):
filepath = os.path.join(root, file)
imports = list(map(lambda x: x + '.py', set(extract_imports(filepath)) & set(all_modules)))
if len(imports) == 0: continue
graph[file] = imports
return graph
def dfs(adj_list, node, visited, result):
visited.add(node)
if node in adj_list:
for neighbor in adj_list[node]:
if neighbor not in visited:
dfs(adj_list, neighbor, visited, result)
result.append(node)
def get_test_order(adj_list):
if not adj_list:
return []
visited = set()
test_order = []
# Find leaf nodes (test suites)
leaf_nodes = [node for node in adj_list if node.startswith("test")]
# Perform DFS starting from each leaf node
for leaf_node in leaf_nodes:
if leaf_node not in visited:
dfs(adj_list, leaf_node, visited, test_order)
print(test_order)
return test_order
Metadata-Version: 2.1
Name: agilecoder
Version: 0.1.5
Summary: AgileCoder
Home-page: https://github.com/FSoft-AI4Code/AgileCoder
Author: FSoft-AI4Code
Author-email: support.aic@fpt.com
License: Apache-2.0
Platform: UNKNOWN
Requires-Python: >=3.8
UNKNOWN
<p align="center">
<br>
<img src="assets/logo_1.svg" width="500"/>
<br>
<p>
<div align="center">
<a href="https://opensource.org/license/apache-2-0/">
<img alt="license" src="https://img.shields.io/badge/License-Apache%202.0-green.svg"/>
</a>
<a href="https://www.python.org/downloads/release/python-380/">
<img alt="python" src="https://img.shields.io/badge/python-3.8+-yellow.svg"/>
</a>
# AgileCoder: A Multi-Agents Software Development Framework based on Agile Methodology
<!--
[![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg)](https://github.com/bdqnghi/CodeTF_personal/blob/main/LICENSE)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/release/python-390/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -->
</div>
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation-guide)
- [Getting Started](#getting-started)
- [Inferencing Pipeline](#inferencing-pipeline)
- [Model Zoo](#model-zoo)
- [Fine-Tuning Your Own Model](#fine-tuning-pipeline)
- [Evaluate On Well-Known Benchmarks](#evaluate-on-well-known-benchmarks)
- [Utilities to Manipulate Source Code Based on AST](#code-utilities)
- [AST Parser in Multiple Languages](#ast-parser-in-multiple-languages)
- [Extract Code Attributes](#extract-code-attributes)
- [Remove Comments](#remove-comments)
- [Ethical and Responsible Use](#ethical-and-responsible-use)
- [License](#license)
## Overview
## Installation
To install the latest version, please clone this repository and then run the command
``
pip install -e AgileCoder
``
Our library is now available on Pypi, so it can be easily installed by
``
pip install agilecoder
``
Note: The current version available on PyPI does not support the demonstration
We currently supports Azure OpenAI service, so please set following environment variables:
* API_KEY
* RESOURCE_ENDPOINT
* API_TYPE
* API_VERSION
* API_ENGINE
## Get Started
To produce your desired software, simply run the command
``
agilecoder --task "<your requirement about the product you want AgileCoder to create>"
``
For example,
``
agilecoder --task "create a caro game in python"
``
## Demo
To begin showcasing the Flask app, navigate to the directory `agilecoder/online_log` and execute the following command:
``
python app.py
``
[egg_info]
tag_build =
tag_date = 0
from setuptools import setup, find_packages
setup(name='agilecoder',
version='0.1.5',
description='AgileCoder',
url='https://github.com/FSoft-AI4Code/AgileCoder',
author='FSoft-AI4Code',
author_email='support.aic@fpt.com',
license='Apache-2.0',
python_requires=">=3.8",
include_package_data=True,
package_data={"agilecoder": ["CompanyConfig/*/*.json"]},
entry_points={
'console_scripts': ['agilecoder=agilecoder:main'],
},
install_requires=[
"openai==0.28.1",
"tiktoken",
"markdown",
"colorama",
"nltk",
"tenacity",
"python-dotenv"
],
packages=find_packages(),
zip_safe=False)
+1
-0

@@ -21,2 +21,3 @@ # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========

import agilecoder.camel.utils
import agilecoder.camel.dependency

@@ -23,0 +24,0 @@ __version__ = '0.1.0'

+1
-1

@@ -63,3 +63,3 @@ # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========

model_config = model_config or ChatGPTConfig(temperature=1.0)
model_config = model_config or ChatGPTConfig(temperature=0.1)

@@ -66,0 +66,0 @@ system_message = SystemMessage(

@@ -67,3 +67,3 @@ # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========

"""
temperature: float = 0.2 # openai default: 1.0
temperature: float = 0.1 # openai default: 1.0
top_p: float = 1.0

@@ -70,0 +70,0 @@ n: int = 1

@@ -17,2 +17,3 @@ import argparse

args = parser.parse_args()
print('------------------------------')
run_task(args)

@@ -90,14 +90,40 @@ {

{
"phase": "CodeReview",
"phase": "CodeReviewChain",
"phaseType": "ComposedPhase",
"cycleNum": 3,
"cycleNum": 2,
"Composition": [
{
"phase": "CodeReviewComment",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
"phase": "CodeReview",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReviewComment1",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview1Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}
]
},
{
"phase": "CodeAndFormat",
"phase": "CodeReview",
"phaseType": "ComposedPhase",

@@ -107,3 +133,3 @@ "cycleNum": 1,

{
"phase": "CodeReviewModification",
"phase": "CodeReviewComment2",
"phaseType": "SimplePhase",

@@ -114,6 +140,51 @@ "max_turn_step": 1,

{
"phase": "CodeFormatting",
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview2Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}
]
},
{
"phase": "CodeReview",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReviewComment3",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview3Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}

@@ -130,3 +201,3 @@ ]

{
"phase": "TestingPlan",
"phase": "WritingTestSuite",
"phaseType": "SimplePhase",

@@ -137,3 +208,3 @@ "max_turn_step": 1,

{
"phase": "TestErrorSummary",
"phase": "TestingPlan",
"phaseType": "SimplePhase",

@@ -144,8 +215,8 @@ "max_turn_step": 1,

{
"phase": "CodeAndFormat",
"phase": "BugFixing",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"cycleNum": -1,
"Composition": [
{
"phase": "TestModification",
"phase": "TestErrorSummary",
"phaseType": "SimplePhase",

@@ -156,6 +227,19 @@ "max_turn_step": 1,

{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "TestModification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}

@@ -230,17 +314,101 @@ ]

{
"phase": "CodeReview",
"phase": "CodeReviewChain",
"phaseType": "ComposedPhase",
"cycleNum": 3,
"cycleNum": 2,
"Composition": [
{
"phase": "CodeReviewComment",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
"phase": "CodeReview",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReviewComment1",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview1Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}
]
},
{
"phase": "CodeReviewModification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
"phase": "CodeReview",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReviewComment2",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview2Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}
]
},
{
"phase": "CodeReview",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReviewComment3",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "CodeReview3Modification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}
]
}

@@ -255,3 +423,3 @@ ]

{
"phase": "TestingPlan",
"phase": "WritingTestSuite",
"phaseType": "SimplePhase",

@@ -262,3 +430,3 @@ "max_turn_step": 1,

{
"phase": "TestErrorSummary",
"phase": "TestingPlan",
"phaseType": "SimplePhase",

@@ -269,8 +437,8 @@ "max_turn_step": 1,

{
"phase": "CodeAndFormat",
"phase": "BugFixing",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"cycleNum": -1,
"Composition": [
{
"phase": "TestModification",
"phase": "TestErrorSummary",
"phaseType": "SimplePhase",

@@ -281,6 +449,19 @@ "max_turn_step": 1,

{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
"phase": "CodeAndFormat",
"phaseType": "ComposedPhase",
"cycleNum": 1,
"Composition": [
{
"phase": "TestModification",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
},
{
"phase": "CodeFormatting",
"phaseType": "SimplePhase",
"max_turn_step": 1,
"need_reflect": "False"
}
]
}

@@ -287,0 +468,0 @@ ]

@@ -27,5 +27,5 @@ {

"Modality: \"{modality}\".",
"We have decided to complete the task through a executable software implemented via a programming language. ",
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
"We have decided to complete the task through a executable software implemented via one or many programming languages. ",
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose suitable programming languages. If python can complete this task via Python, please answer Python; otherwise, answer another programming languages (e.g., Java, C++, etc,). If users wants to create a website, please consider HTML and CSS to complete the tasks.",
"Note that we must ONLY discuss the target programming languages and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> LANGUAGES\" where LANGUAGES represents programming languages."
]

@@ -44,8 +44,8 @@ },

"You must also prioritize product backlog items with the important items appearing at the first.",
"Your answer must adhere to the following format:",
"Your answer must follow the following format:",
"Product Backlog:",
"$PRODUCT_BACKLOG",
"PRODUCT_BACKLOG",
"Acceptance Criteria:",
"$ACCEPTANCE_CRITERIA",
"where $PRODUCT_BACKLOG is the product backlog for the user's task and $ACCEPTANCE_CRITERIA is the corresponding acceptance criteria of the product backlog.",
"ACCEPTANCE_CRITERIA",
"where PRODUCT_BACKLOG is the product backlog for the user's task and ACCEPTANCE_CRITERIA is the corresponding acceptance criteria of the product backlog.",
"Importantly, you must consider the skills of the development team to write the feasible product backlog. Advanced features like AI and sounds can not be implemented properly."

@@ -62,8 +62,10 @@ ]

"Programming Language: \"{language}\"",
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands, I suggest the following product backlog:",
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands, I suggest the following product backlog and acceptance criteria:",
"Product backlog:\n\"{plain_product_backlog}\"",
"As the development team, you should review and provide useful feedback about tasks to make the software run flawlessly by obeying the regulations below",
"Acceptance Criteria:\n\"{plain_acceptance_criteria}\"",
"As the development team, you should review and provide useful feedback about tasks to make the software run flawlessly by obeying the regulations below:",
"1) considering the proficiency of the members, all the tasks are feasible and finished by at least one member",
"2) the product backlog must not incorporate enhanced features like AI, animations and sound effects unless explicitly specified in the user's task.",
"Now, you should check the above regulations one by one and review the product backlog in detail, propose one comment with the highest priority about the product backlog, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the product backlog is perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
"3) the acceptance criteria should be detailed, clear and testable",
"Now, you should check the above regulations one by one and review the product backlog and acceptance criteria in detail, propose one comment with the highest priority about the product backlog and acceptance criteria, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If they are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]

@@ -80,6 +82,12 @@ },

"Product backlog:\n\"{plain_product_backlog}\"",
"Comments on Product backlog:",
"Acceptance Criteria:\n\"{plain_acceptance_criteria}\"",
"Comments on Product backlog and Acceptance Criteria:",
"\"{product_backlog_comments}\"",
"We have decided to complete the task through a executable software with multiple files implemented via {language}.",
"As the {assistant_role}, to satisfy the user's demand and make the software executive and robust, and ensure that the product backlog is feasible and can be accomplished, you should modify corresponding product backlog according to the comments. Then, output the full and complete product backlog with all based on the comments. Return the product backlog strictly following the required format."
"As the {assistant_role}, to satisfy the user's demand and make the software executive and robust, you should modify the product backlog and acceptance criteria according to the comments. Then, output the full and complete product backlog and acceptance criteria with all based on the comments. Your answer must follow the following format and you are not allowed to change the required format:",
"Product Backlog:",
"PRODUCT_BACKLOG",
"Acceptance Criteria:",
"ACCEPTANCE_CRITERIA",
"where PRODUCT_BACKLOG is the revised product backlog and ACCEPTANCE_CRITERIA is the corresponding acceptance criteria of the product backlog."
]

@@ -99,7 +107,9 @@ },

"Sprint backlog:\n\"{current_programming_task}\"",
"As the {assistant_role}, you should review and provide useful feedback about sprint goals and sprint backlog to make the software run flawlessly by obeying the regulations below",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"As the {assistant_role}, you should review and provide useful feedback about sprint goals, sprint backlog and sprint acceptance criteria to make the software run flawlessly by obeying the regulations below",
"1) considering the proficiency of the members, all the tasks are feasible and finished by at least one member,",
"2) the sprint backlog must not incorporate enhanced features like AI and sound effects unless explicitly specified in the user's task,",
"3) all the items in sprint backlog are from the product backlog.",
"Now, you should check the above regulations one by one and review the sprint goals and sprint backlog in detail, propose one comment with the highest priority about them, and give me instructions on how to fix to ensure the sprint backlog aligns well with the regulations above. Tell me your comment with the highest priority and corresponding suggestions on revision. If the sprint goals and sprint backlog are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
"4) the acceptance criteria should be detailed, clear and testable for Tester to write test cases.",
"Now, you should check the above regulations one by one and review the sprint goals, sprint backlog and sprint acceptance criteria in detail, propose one comment with the highest priority about them, and give me instructions on how to fix to ensure the sprint backlog aligns well with the regulations above. Tell me your comment with the highest priority and corresponding suggestions on revision. If the sprint goals and sprint backlog are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]

@@ -118,11 +128,16 @@ },

"Sprint backlog:\n\"{current_programming_task}\"",
"Comments on sprint goals and sprint backlog:",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Comments on sprint goals, sprint backlog and sprint acceptance criteria:",
"\"{sprint_backlog_comments}\"",
"We have decided to complete the task through a executable software with multiple files implemented via {language}.",
"As the {assistant_role}, to satisfy the user's demand and make the software executive and robust, and ensure that the sprint goals and sprint backlog are feasible and can be accomplished, you should modify corresponding sprint backlog according to the comments. Then, output the full and complete sprint backlog with all based on the comments. Return the output strictly following the required format:",
"As the {assistant_role}, to satisfy the user's demand and make the software executive and robust, and ensure that the sprint goals and sprint backlog are feasible and can be accomplished, you should modify corresponding sprint backlog according to the comments. Then, output the full and complete sprint backlog with all based on the comments. Return the output strictly following the required format and you are not allowed to change the required format:",
"Sprint Goals:",
"$SPRINT_GOALS",
"SPRINT_GOALS",
"Sprint Backlog:",
"$SPRINT_BACKLOG",
"where $SPRINT_GOALS are the goals of the sprint, and $SPRINT_BACKLOG is the sprint backlog"
"SPRINT_BACKLOG",
"Sprint Acceptance Criteria:",
"SPRINT_ACCEPTANCE_CRITERIA",
"where SPRINT_GOALS are the goals of the sprint, SPRINT_BACKLOG is the sprint backlog, and SPRINT_ACCEPTANCE_CRITERIA is the sprint acceptance criteria for the sprint backlog.",
"Note that SPRINT_GOALS, SPRINT_BACKLOG, and SPRINT_ACCEPTANCE_CRITERIA are pseudo tokens, and your answer is prohibited from including these tokens.",
"Importantly, note that the product backlog is divided into multiple sprints and each sprint should contain enough workload."
]

@@ -134,3 +149,3 @@ },

"phase_prompt": [
"According to the user's task, our software designs and product backlog listed below: ",
"According to the user's task, our software designs, product backlog and acceptance criteria listed below: ",
"Task: \"{task}\".",

@@ -140,16 +155,21 @@ "Modality: \"{modality}\".",

"Product backlog:\n\"{plain_product_backlog}\"",
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands, you must create the first sprint backlog and the goals of this sprint from the product backlog.",
"Acceptance Criteria:\n\"{plain_acceptance_criteria}\"",
"We have decided to complete the task through multiple sprints by creating a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands, you must define the FIRST sprint, including the sprint backlog, the goals of this sprint and sprint acceptance criteria from the product backlog and acceptance criteria.",
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
"Your answer strictly obeys the following format:",
"Your answer strictly obeys the following format and you are not allowed to change the required format:",
"Sprint Goals:",
"$SPRINT_GOALS",
"SPRINT_GOALS",
"Sprint Backlog:",
"$SPRINT_BACKLOG",
"where $SPRINT_GOALS are the goals of the sprint, and $SPRINT_BACKLOG is the sprint backlog whose items are from the product backlog.",
"You must ensure that $SPRINT_GOALS and $SPRINT_BACKLOG must not be empty and $SPRINT_BACKLOG aligns with $SPRINT_GOALS.",
"SPRINT_BACKLOG",
"Sprint Acceptance Criteria:",
"SPRINT_ACCEPTANCE_CRITERIA",
"where SPRINT_GOALS are the goals of the sprint, SPRINT_BACKLOG is the sprint backlog whose items are from the product backlog, and SPRINT_ACCEPTANCE_CRITERIA is the sprint acceptance criteria for the sprint backlog, which can be tested autonomously by test suites.",
"Please note that SPRINT_GOALS, SPRINT_BACKLOG, and SPRINT_ACCEPTANCE_CRITERIA are pseudo tokens, and your answer is prohibited from including these tokens.",
"You must ensure that SPRINT_GOALS, SPRINT_BACKLOG and SPRINT_ACCEPTANCE_CRITERIA must not be empty and SPRINT_BACKLOG aligns with SPRINT_GOALS and SPRINT_ACCEPTANCE_CRITERIA.",
"As the Product Owner, you must create the first sprint and adhere to the following regulations:",
"1) considering the proficiency of the members, all the tasks are feasible and finished by at least one member,",
"2) the sprint backlog must not include enhanced features like AI, animations and sound effects,",
"3) importantly, the product backlog should be divided into at least 2 sprints and each sprint should contain enough workload,",
"4) the first sprint backlog sets the stage for next sprints."
"\t1) considering the proficiency of the members, all the tasks are feasible and finished by at least one member,",
"\t2) the sprint backlog must not include enhanced features like AI, animations and sound effects,",
"\t3) importantly, the product backlog should be divided into at least 2 sprints and each sprint should contain enough workload,",
"\t4) the first sprint backlog sets the stage for next sprints.",
"\t5) the sprint acceptance criteria should be clear, detailed and testable for Tester to write test cases."
]

@@ -161,3 +181,3 @@ },

"phase_prompt": [
"According to the user's task, our software designs, product backlog listed below: ",
"According to the user's task, our software designs, product backlog and acceptance criteria listed below: ",
"Task: \"{task}\".",

@@ -167,2 +187,3 @@ "Modality: \"{modality}\".",

"Product backlog:\n\"{plain_product_backlog}\"",
"Acceptance Criteria:\n\"{plain_acceptance_criteria}\"",
"We have decided to complete the task through a executable software with multiple files implemented via {language}. We are using Agile Scrum for software development. We finished some sprints with done tasks and undone tasks as below:",

@@ -179,7 +200,10 @@ "Done tasks: ",

"Sprint Goals:",
"$SPRINT_GOALS",
"SPRINT_GOALS",
"Sprint Backlog:",
"$SPRINT_BACKLOG",
"where $SPRINT_GOALS are the goals of the sprint, and $SPRINT_BACKLOG is the sprint backlog whose items are from the product backlog, meaning that you must not devise new tasks or non-practical features.",
"You must ensure that $SPRINT_GOALS and $SPRINT_BACKLOG must not be empty and $SPRINT_BACKLOG aligns with $SPRINT_GOALS.",
"SPRINT_BACKLOG",
"Sprint Acceptance Criteria:",
"SPRINT_ACCEPTANCE_CRITERIA",
"where SPRINT_GOALS are the goals of the sprint, SPRINT_BACKLOG is the sprint backlog whose items are from the product backlog, and SPRINT_ACCEPTANCE_CRITERIA is the sprint acceptance criteria for the sprint backlog, which can be tested autonomously by test suites. It should be noted that you must not devise new tasks or non-practical features.",
"Please note that SPRINT_GOALS, SPRINT_BACKLOG, and SPRINT_ACCEPTANCE_CRITERIA are pseudo tokens, and your answer is prohibited from including these tokens.",
"You must ensure that SPRINT_GOALS, SPRINT_BACKLOG and SPRINT_ACCEPTANCE_CRITERIA must not be empty and SPRINT_BACKLOG aligns with SPRINT_GOALS and SPRINT_ACCEPTANCE_CRITERIA.",
"As the Product Owner, you must adhere to the following regulations:",

@@ -189,4 +213,4 @@ "1) considering the proficiency of the members, all the tasks are feasible and finished by at least one member,",

"3) the sprint backlog chosen sets the stage for next sprints.",
"4) the sprint acceptance criteria should be clear, detailed and testable for Tester to write test cases.",
"Note that the product backlog is divided into multiple sprints and each sprint should contain enough workload."
]

@@ -204,2 +228,3 @@ },

"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Source Codes:",

@@ -215,9 +240,8 @@ "\"{codes}\"",

"Done Work:",
"$DONE_WORK",
"DONE_WORK",
"Undone Work:",
"$UNDONE_WORK",
"where $DONE_WORK are carefully completed and tested works, $UNDONE_WORK includes unfinished works or existing bugs."
"UNDONE_WORK",
"where DONE_WORK are carefully completed and tested works, UNDONE_WORK includes unfinished works or existing bugs."
]
},
"RolesEngagement": {

@@ -251,13 +275,23 @@ "assistant_role_name": "Development Team",

"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"To satisfy the sprint goals, we have decided to complete the sprint backlog through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands and the sprint goals, you should accomplish the sprint backlog by writing one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code:",
"$FILENAME",
"```$LANGUAGE",
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",
"Example of the format:",
"a.py",
"```python",
"def f():",
"'''",
"an empty function",
"'''",
" pass",
"```",
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",

@@ -267,2 +301,65 @@ "Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."

},
"WritingTestSuite": {
"assistant_role_name": "Software Test Engineer",
"user_role_name": "Programmer",
"phase_prompt": [
"According to the new user's task and our software designs listed below: ",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"To satisfy the sprint goals, we have decided to complete the sprint backlog through a executable software with multiple files implemented via {language} with detailed source code below:",
"Codes:",
"\"{codes}\"",
"However, the source code above has not been tested comprehensively to ensure the correctness, so it potential has undiscovered bugs.",
"As the Software Test Engineer, you must write automated tests to ensure that the source code runs flawlessly and aligns with the sprint goals and the sprint backlog. Your test cases should cover all possibilities of source code and fulfill the sprint acceptance criteria.",
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
"Then you will only output the content of each testing script including complete testing code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"DOCSTRING",
"'''",
"CODE",
"```",
"Please note that each test case should be fully executable individually. Ensure to implement all functions so that the sprint acceptance criteria is satisfied perfectly. No placeholders (such as 'pass' in Python)."
]
},
"SolutionDesign": {
"assistant_role_name": "Development Team",
"user_role_name": "Product Owner",
"phase_prompt": [
"According to the new user's task and our software designs listed below: ",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"To satisfy the sprint goals, we have decided to complete the sprint backlog through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the user's demands and the sprint goals, you should accomplish the sprint backlog and sprint goals by designing solution architecture and method interfaces. {gui}",
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"DOCSTRING",
"'''",
"CODE",
"```",
"Example of the format:",
"a.py",
"```python",
"def f():",
"'''",
"an empty function",
"'''",
" pass",
"```",
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
]
},
"CodeFormatting": {

@@ -276,16 +373,16 @@ "assistant_role_name": "Programmer",

"Required Code Format:",
"$FILENAME",
"```$LANGUAGE",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",
"where \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code.",
"where FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code.",
"Comments:",
"The code above contains enough values for the required fields: \"$FILENAME\", \"$LANGUAGE\", \"$DOCSTRING\" and \"$CODE\". However, they are not written to follow the format properly. You should rearrange them to satisfy the requirement.",
"The code above contains enough values for the required fields: FILENAME, LANGUAGES, DOCSTRING and CODE. However, they are not written to follow the format properly. You should rearrange them to satisfy the requirement.",
"Example:",
"a.py",
"```python",
"def a():",
"def f():",
" pass",

@@ -311,13 +408,23 @@ "```",

"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"As the {assistant_role}, to satisfy the user's demands and the sprint goals, you should accomplish the sprint backlog by inheriting existing source code and writing one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code:",
"$FILENAME",
"```$LANGUAGE",
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",
"Example of the format:",
"a.py",
"```python",
"def f():",
"'''",
"an empty function",
"'''",
" pass",
"```",
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",

@@ -337,8 +444,8 @@ "Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."

"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
"$FILENAME",
"```$LANGUAGE",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",

@@ -393,9 +500,9 @@ "As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",

"\"{unimplemented_file}\"",
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code:",
"$FILENAME",
"```$LANGUAGE",
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",

@@ -415,2 +522,3 @@ "As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."

"Sprint backlog:\n\"{current_programming_task}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Codes:",

@@ -421,15 +529,81 @@ "\"{codes}\"",

"As the {assistant_role}, to make the software directly operable without further coding, AgileCoder have formulated the following regulations:",
"1) all referenced classes should be imported;",
"2) all methods should be implemented;",
"3) all methods need to have the necessary comments;",
"4) no potential bugs;",
"5) The entire project conforms to the tasks proposed by the user;",
"6) To satisfy the sprint goals, the code implements all the tasks in the sprint backlog;",
"7) Make sure the used assets like images must exist and be referred properly",
"8) Ensure that the colors used are easy on the eye",
"9) prohibitively put code in a try-exception in the main.py",
"10) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
"\t1) all referenced classes should be imported;",
"\t2) all methods should be implemented;",
"\t3) all methods need to have the necessary comments;",
"\t4) no potential bugs;",
"\t5) The entire project conforms to the tasks proposed by the user;",
"\t6) To satisfy the sprint goals, the code implements all the tasks in the sprint backlog;",
"\t7) Make sure the used assets like images must exist and be referred properly;",
"\t8) Ensure that the colors used are easy on the eye;",
"\t9) prohibitively put code in a try-exception in the main.py;",
"\t10) ensure that no classes or methods are duplicated;",
"\t11) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]
},
"CodeReviewComment1": {
"assistant_role_name": "Code Reviewer",
"user_role_name": "Programmer",
"phase_prompt": [
"According to the user's task, the sprint backlog and our software designs:",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Changed Codes:",
"\"{codes}\"",
"Assets' paths:",
"\"{paths}\"",
"As the {assistant_role}, to make the software directly operable without further coding, AgileCoder have formulated the following regulations:",
"\t1) all referenced classes should be imported;",
"\t2) all methods should be implemented;",
"\t3) all methods need to have the necessary comments;",
"\t4) prohibitively put code in a try-exception in the main.py;",
"\t5) ensure that no code is duplicated and the answer is not allowed to repeat code;",
"\t6) no potential bugs;",
"\t7) Make sure the used assets like images must exist and be referred properly;",
"Now, you should check the above regulations one by one and review the changed codes in detail, propose one comment with the highest priority about the codes, and give me instructions in text on how to fix and does not include modified code.Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]
},
"CodeReviewComment2": {
"assistant_role_name": "Code Reviewer",
"user_role_name": "Programmer",
"phase_prompt": [
"According to the user's task, the sprint backlog and our software designs:",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Changed Codes:",
"\"{codes}\"",
"As the {assistant_role}, to make the software directly operable without further coding, AgileCoder have formulated the following regulations:",
"\t1) The entire project conforms to the tasks proposed by the user;",
"\t2) To satisfy the sprint goals, the code implements all the tasks in the sprint backlog;",
"\t3) ensure that no code is duplicated and the answer is not allowed to repeat code;",
"\t4) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
"Now, you should check the above regulations one by one and review the changed codes in detail, propose one comment with the highest priority about the codes, and give me instructions in text on how to fix and does not include modified code. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]
},
"CodeReviewComment3": {
"assistant_role_name": "Code Reviewer",
"user_role_name": "Programmer",
"phase_prompt": [
"According to the user's task, the sprint goal, sprint acceptance criteria and our software designs:",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Changed Codes:",
"\"{codes}\"",
"As the {assistant_role}, to make the software directly operable without further coding, AgileCoder have formulated the following regulations:",
"\t1) no potential bugs;",
"\t2) the code fulfills all criteria in the sprint acceptance criteria;",
"\t3) ensure that no code is duplicated and the answer is not allowed to repeat code;",
"\t4) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without creating any new bugs;",
"Now, you should check the above regulations one by one and review the changed codes in detail, propose one comment with the highest priority about the codes, and give me instructions in text on how to fix and does not include modified code. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
]
},
"CodeReviewModification": {

@@ -439,3 +613,3 @@ "assistant_role_name": "Programmer",

"phase_prompt": [
"According to the user's task, our designed product modality, languages, the sprint goals and the sprint backlog, our developed first-edition source codes are listed below: ",
"According to the user's task, our designed product modality, languages, the sprint goals and the sprint backlog, our changed source codes are listed below: ",
"User's task: \"{task}\".",

@@ -446,13 +620,14 @@ "Modality: \"{modality}\".",

"Sprint backlog:\n\"{current_programming_task}\"",
"Codes: ",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Codes:",
"\"{codes}\"",
"Comments on Codes:",
"\"{comments}\"",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code. Format:",
"$FILENAME",
"```$LANGUAGE",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code. Format:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",

@@ -462,2 +637,77 @@ "As the {assistant_role}, to satisfy the user's demand and the sprint goals, make the software creative, executive and robust, and ensure that the code resolves the sprint backlog, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."

},
"CodeReview1Modification": {
"assistant_role_name": "Programmer",
"user_role_name": "Code Reviewer",
"phase_prompt": [
"According to the user's task, our designed product modality, languages, the sprint goals and the sprint backlog, our developed source codes are listed below: ",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Codes:",
"\"{codes}\"",
"Comments on Codes:",
"\"{comments}\"",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code. Format:",
"FILENAME",
"```LANGUAGE",
"'''",
"DOCSTRING",
"'''",
"CODE",
"```",
"As the {assistant_role}, to satisfy the user's demand, the sprint goals and the sprint backlog, make the software creative, executive and robust, and ensure that the code resolves the sprint backlog, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
]
},
"CodeReview2Modification": {
"assistant_role_name": "Programmer",
"user_role_name": "Code Reviewer",
"phase_prompt": [
"According to the user's task, our designed product modality, languages, the sprint goals and the sprint backlog, our developed source codes are listed below: ",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint backlog:\n\"{current_programming_task}\"",
"Codes:",
"\"{codes}\"",
"Comments on Codes:",
"\"{comments}\"",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code. Format:",
"FILENAME",
"```LANGUAGE",
"'''",
"DOCSTRING",
"'''",
"CODE",
"```",
"As the {assistant_role}, to satisfy the user's demand, the sprint goals and the sprint backlog, make the software creative, executive and robust, and ensure that the code resolves the sprint backlog, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
]
},
"CodeReview3Modification": {
"assistant_role_name": "Programmer",
"user_role_name": "Code Reviewer",
"phase_prompt": [
"According to the user's task, our designed product modality, languages, the sprint goals and the sprint acceptance criteria, our developed source codes are listed below: ",
"User's task: \"{task}\".",
"Modality: \"{modality}\".",
"Programming Language: \"{language}\"",
"Sprint goals:\n\"{current_sprint_goals}\"",
"Sprint acceptance criteria:\n\"{current_acceptance_criteria}\"",
"Codes:",
"\"{codes}\"",
"Comments on Codes:",
"\"{comments}\"",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code. Format:",
"FILENAME",
"```LANGUAGE",
"'''",
"DOCSTRING",
"'''",
"CODE",
"```",
"As the {assistant_role}, to satisfy the user's demand, the sprint goals and the sprint acceptance criteria, make the software creative, executive and robust, and ensure that the code resolves the sprint backlog, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
]
},
"CodeReviewHuman": {

@@ -477,9 +727,9 @@ "assistant_role_name": "Programmer",

"\"{comments}\"",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code. Format:",
"$FILENAME",
"```$LANGUAGE",
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code. Format:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",

@@ -514,7 +764,9 @@ "As the {assistant_role}, to satisfy new user's demand and the sprint goals, make the software creative, executive and robust, and ensure that the code resolves the sprint backlog, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."

"\"{codes}\"",
"As the {assistant_role}, to make that the code above satisfies the sprint goals and backlog and runs flawlessly, you must write commands to start the UI of the software and test the correctness of the code above.",
"As the {assistant_role}, to make that the code above satisfies the sprint goals and backlog and runs flawlessly, you must write commands to:",
"\t1) run testing scripts available in the source code,",
"\t2) start the UI of the software and test the correctness of the code above.",
"Also, you strictly follow the format:",
"Commands:",
"$COMMANDS",
"Here, $COMMANDS are necessary commands for starting the software and testing the code above."
"COMMANDS",
"Here, COMMANDS are necessary commands for starting the software and testing the code above."
]

@@ -534,12 +786,12 @@ },

"\"{error_summary}\"",
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"$FILENAME\" is the lowercase file name including the file extension, \"$LANGUAGE\" in the programming language, \"$DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"$CODE\" is the original code:",
"$FILENAME",
"```$LANGUAGE",
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANGUAGE in the programming language, DOCSTRING is a string literal specified in source code that is used to document a specific segment of code, and CODE is the original code:",
"FILENAME",
"```LANGUAGE",
"'''",
"$DOCSTRING",
"DOCSTRING",
"'''",
"$CODE",
"CODE",
"```",
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary.",
"Now, use the format exemplified above and modify the problematic codes based on the error summary. If you cannot find the assets from the existing paths, you should consider remove relevant code and features. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including $FILENAME, $LANGUAGE, $DOCSTRING and $CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
"Now, use the format exemplified above and modify the problematic codes based on the error summary. If you cannot find the assets from the existing paths, you should consider remove relevant code and features. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
]

@@ -546,0 +798,0 @@ },

@@ -17,4 +17,4 @@ import os

from agilecoder.components.utils import log_and_print_online
from agilecoder.camel.dependency import build_dependency_graph, get_test_order
class ChatEnvConfig:

@@ -58,2 +58,3 @@ def __init__(self, clear_structure,

self.codes: Codes = Codes()
self.dependency_graph = None
self.proposed_images: Dict[str, str] = {}

@@ -103,3 +104,3 @@ self.incorporated_images: Dict[str, str] = {}

def exist_bugs(self) -> tuple[bool, str]:
def exist_bugs(self, chat_env) -> tuple[bool, str]:
directory = self.env_dict['directory']

@@ -123,5 +124,2 @@ print('DIRECTORY:', directory)

all_files = os.listdir(directory)
testing_commands = self.env_dict['commands']
return_flag = False
error_contents = ''
runnable_files = []

@@ -136,8 +134,23 @@ is_python = False

runnable_files.append(file)
if is_python and len(runnable_files) == 0:
return True, "[Error] the software lacks an entry point to start"
testing_commands.extend(runnable_files)
for testing_command in set(testing_commands):
if testing_command not in runnable_files:
return_flag = False
if 'testing_commands' not in self.env_dict:
testing_commands = self.env_dict['commands']
_testing_commands = list(filter(lambda x: 'test_' in x, get_test_order(chat_env.dependency_graph)))
additional_commands = list(set(testing_commands) - set(_testing_commands))
testing_commands = _testing_commands + additional_commands
error_contents = ''
if is_python and len(runnable_files) == 0:
return True, "[Error] the software lacks an entry point to start"
testing_commands.extend(runnable_files)
# testing_commands.extend(['-m unittest'])
testing_commands = list(set(testing_commands))
else:
testing_commands = self.env_dict['testing_commands']
error_contents = ''
current_idx = 0
for testing_command in testing_commands:
if testing_command != '-m unittest' and testing_command not in runnable_files:
errs = "[Error] the software lacks an entry point to start"

@@ -205,8 +218,8 @@ error_contents += """\nError Traceback for Running {testing_command}:\n{errs}""".format(testing_command = testing_command, errs = errs)

error_output = process.stderr.read().decode('utf-8')
if error_output:
if return_code != 0:
if return_code != 0:
if error_output:
if "Traceback".lower() in error_output.lower():
errs = error_output.replace(directory + "/", "")
# return True, errs
error_contents += """\nError Traceback for Running {testing_command}:\n{errs}""".format(testing_command = testing_command, errs = errs)
error_contents += """\nError Traceback for Running `{testing_command}:\n{errs}""".format(testing_command = testing_command, errs = errs)
return_flag = True

@@ -216,10 +229,13 @@

# return False, success_info
else:
if 'error' in error_output.lower():
return_flag = True
error_contents += """\nError Traceback for Running {testing_command}:\n{errs}""".format(testing_command = testing_command, errs = errs)
# else:
# return_flag = True
# error_contents += """\nError Traceback for Running `{testing_command}`":\n{errs}""".format(testing_command = testing_command, errs = errs)
current_idx += 1
if return_flag:
chat_env.env_dict['testing_commands'] = testing_commands[current_idx:]
break
if return_flag:
return return_flag, error_contents
else:
chat_env.env_dict['testing_commands'] = []
return False, success_info

@@ -242,14 +258,22 @@ except subprocess.CalledProcessError as e:

def update_codes(self, generated_content):
return self.codes._update_codes(generated_content)
def update_codes(self, generated_content, is_testing = False):
return self.codes._update_codes(generated_content, is_testing)
def rewrite_codes(self) -> None:
self.codes._rewrite_codes(self.config.git_management)
self.dependency_graph = build_dependency_graph(self.env_dict['directory'])
print('self.dependency_graph', self.dependency_graph)
def get_high_overlap_code(self):
return self.codes._get_high_overlap_code()
def get_codes(self) -> str:
return self.codes._get_codes()
def get_codes(self, ignore_test_code = True, simplify_code = False, only_test_code = False) -> str:
return self.codes._get_codes(ignore_test_code, simplify_code, only_test_code)
def _load_from_hardware(self, directory) -> None:
self.codes._load_from_hardware(directory)
def get_total_changed_lines(self):
if hasattr(self.codes, 'total_changed_lines'): return self.codes.total_changed_lines
def _update_requirements(self, generated_content):

@@ -256,0 +280,0 @@ self.requirements._update_docs(generated_content)

import os
import re
from strsimpy.normalized_levenshtein import NormalizedLevenshtein
# from strsimpy.normalized_levenshtein import NormalizedLevenshtein
from nltk.translate.bleu_score import sentence_bleu
from agilecoder.components.utils import log_and_print_online

@@ -44,4 +45,31 @@ import difflib

return files
def extract_class_names(source_code):
pattern = r'class\s+([A-Za-z_]\w*)'
class_names = re.findall(pattern, source_code)
return class_names
def simplify_code(code):
codelines = code.splitlines()
outputs = []
flag = False
for line in codelines:
if line.strip().startswith('def'):
flag = True
is_docstring = 0
if flag and line.strip() in ['"""', "'''"]:
is_docstring += 1
# if not is_docstring:
# flag = False
if flag and is_docstring == 2:
outputs.append(line)
is_docstring += 1
if flag and is_docstring > 2: continue
outputs.append(line)
return '\n'.join(outputs)
class Codes:
def __init__(self, generated_content=""):
def __init__(self, generated_content="", is_testing = False):
self.directory: str = None

@@ -51,2 +79,4 @@ self.version: float = 1.0

self.codebooks = {}
self.testing_filenames = set()
self.is_testing = is_testing

@@ -57,3 +87,3 @@ def extract_filename_from_line(lines):

file_name = candidate.group()
file_name = file_name.lower()
file_name = file_name#.lower()
return file_name

@@ -79,2 +109,17 @@

flag = False
# normalized_levenshtein = NormalizedLevenshtein()
# for match in matches:
# flag = True
# code = match.group(1)
# if "CODE" in code:
# continue
# if not self.is_testing and ("__main__" in code or 'main.py' in code):
# # filename = "main.py"
# filename = None
# else:
# filename = extract_filename_from_code(code)
# if filename is not None and filename != '.py' and code is not None and len(filename) > 0 and len(code) > 0:
# self.codebooks[filename] = self._format_code(code)
# else:
# unmatched_codes.append(self._format_code(code))
for match in matches:

@@ -85,19 +130,34 @@ flag = True

continue
if "__main__" in code or 'main.py' in code:
filename = "main.py"
else:
filename = extract_filename_from_code(code)
if filename is not None and filename != '.py' and code is not None and len(filename) > 0 and len(code) > 0:
self.codebooks[filename] = self._format_code(code)
else:
unmatched_codes.append(self._format_code(code))
normalized_levenshtein = NormalizedLevenshtein()
for code in unmatched_codes:
# if not self.is_testing and ("__main__" in code or 'main.py' in code):
# # filename = "main.py"
# filename = None
# else:
# filename = extract_filename_from_code(code)
# if filename is not None and filename != '.py' and code is not None and len(filename) > 0 and len(code) > 0:
# self.codebooks[filename] = self._format_code(code)
# else:
# unmatched_codes.append(self._format_code(code))
formatted_code = self._format_code(code)
scores = []
for filename, file_code in self.codebooks.items():
scores.append((filename, code, normalized_levenshtein.similarity(code, file_code)))
scores.append((filename, formatted_code, sentence_bleu([formatted_code.split()], file_code.split())))
has_duplicated = False
if len(scores) > 0:
scores = sorted(scores, key = lambda x: x[2], reverse = True)[0]
if scores[2] > 0.7:
if scores[2] > 0.6:
self.codebooks[scores[0]] = scores[1]
has_duplicated = True
if not has_duplicated:
filename = extract_filename_from_code(code)
if filename is not None and filename != '.py' and formatted_code is not None and len(filename) > 0 and len(formatted_code) > 0:
self.codebooks[filename] = formatted_code
# normalized_levenshtein = NormalizedLevenshtein()
# for code in unmatched_codes:
# scores = []
# for filename, file_code in self.codebooks.items():
# scores.append((filename, code, normalized_levenshtein.similarity(code, file_code)))
# if len(scores) > 0:
# scores = sorted(scores, key = lambda x: x[2], reverse = True)[0]
# if scores[2] > 0.7:
# self.codebooks[scores[0]] = scores[1]

@@ -122,3 +182,3 @@ if not flag:

if not flag:
regex = r"(.+?\.\w+)\n```.*?\n(.*?)```"
regex = r"(.+?\.\w+)\n```\w+\n(.*?)```"
matches = re.finditer(regex, self.generated_content, re.DOTALL)

@@ -134,7 +194,8 @@ flag = False

old_filename = None
if "__main__" in code or 'main.py' in code:
new_filename = "main.py"
if new_filename != filename:
old_filename = filename
filename = new_filename
if not self.is_testing and ("__main__" in code or 'main.py' in code):
# new_filename = "main.py"
# if new_filename != filename:
# old_filename = filename
# filename = new_filename
pass
if filename == "": # post-processing

@@ -145,9 +206,9 @@ filename = extract_filename_from_code(code)

scores = []
normalized_levenshtein = NormalizedLevenshtein()
# normalized_levenshtein = NormalizedLevenshtein()
formatted_code = self._format_code(code)
for _filename, file_code in self.codebooks.items():
scores.append((_filename, formatted_code, normalized_levenshtein.similarity(formatted_code, file_code)))
scores.append((_filename, formatted_code, sentence_bleu([formatted_code.split()], file_code.split())))
if len(scores) > 0:
scores = sorted(scores, key = lambda x: x[2], reverse = True)[0]
if scores[2] > 0.7:
if scores[2] > 0.6:
self.codebooks[scores[0]] = scores[1]

@@ -164,11 +225,13 @@ elif filename is not None and code is not None and len(filename) > 0 and len(code) > 0:

if not flag:
file_codes = extract_files(self.generated_content)
for filename, filecode in file_codes.items():
if filename.endswith('.py'):
if is_valid_syntax(filecode):
try:
file_codes = extract_files(self.generated_content)
for filename, filecode in file_codes.items():
if filename.endswith('.py'):
if is_valid_syntax(filecode):
flag = True
self.codebooks[filename] = self._format_code(filecode)
else:
flag = True
self.codebooks[filename] = self._format_code(filecode)
else:
flag = True
self.codebooks[filename] = self._format_code(filecode)
except: pass

@@ -180,11 +243,44 @@ self.has_correct_format = flag

return code
def _get_high_overlap_code(self):
filename_pairs = set()
results = {}
for filename, filecode in self.codebooks.items():
for filename1, filecode1 in self.codebooks.items():
if filename == filename1: continue
p = filename, filename1
p1 = filename1, filename
if p not in filename_pairs and p1 not in filename_pairs:
filename_pairs.add(p)
else: continue
s = sentence_bleu([filecode.split()], filecode1.split())
if s > 0.6:
results[p] = s
return results
def _update_codes(self, generated_content):
new_codes = Codes(generated_content)
differ = difflib.Differ()
def _update_codes(self, generated_content, is_testing):
new_codes = Codes(generated_content, is_testing)
# differ = difflib.Differ()
flag = False
total_new_length = 0
total_changed_lines = ''
for key in new_codes.codebooks.keys():
total_new_length += len(new_codes.codebooks[key])
corres_key = None
if key not in self.codebooks.keys():
scores = []
for filename, file_code in self.codebooks.items():
scores.append((filename, sentence_bleu([new_codes.codebooks[key].split()], file_code.split())))
if len(scores):
scores = sorted(scores, key = lambda x: x[1], reverse = True)[0]
if scores[1] > 0.6:
corres_key = scores[0]
if key not in self.codebooks.keys() or self.codebooks[key] != new_codes.codebooks[key]:
if is_testing:
self.testing_filenames.update([key])
update_codes_content = "**[Update Codes]**\n\n"
update_codes_content += "{} updated.\n".format(key)
total_changed_lines += "File: {} updated.\n".format(key)
old_codes_content = self.codebooks[key] if key in self.codebooks.keys() else "# None"

@@ -202,7 +298,10 @@ new_codes_content = new_codes.codebooks[key]

'''\n""" + unified_diff + "\n```"
total_changed_lines += "```\n" + unified_diff + "\n```\n"
log_and_print_online(update_codes_content)
self.codebooks[key] = new_codes.codebooks[key]
self.codebooks[corres_key or key] = new_codes.codebooks[key]
flag = True
return flag
self.total_changed_lines = total_changed_lines
return flag and (total_new_length / len(generated_content) > 0.7)
# return hasattr(new_codes, 'has_correct_format') and new_codes.has_correct_format

@@ -233,8 +332,14 @@

def _get_codes(self) -> str:
def _get_codes(self, ignore_test_code, _simplify_code = False, only_test_code = False) -> str:
content = ""
print('self.testing_filenames', self.testing_filenames)
for filename in self.codebooks.keys():
if only_test_code and filename not in self.testing_filenames: continue
elif ignore_test_code and filename in self.testing_filenames: continue
code = self.codebooks[filename]
if _simplify_code:
code = simplify_code(code)
content += "{}\n```{}\n{}\n```\n\n".format(filename,
"python" if filename.endswith(".py") else filename.split(".")[
-1], self.codebooks[filename])
-1], code)
return content

@@ -241,0 +346,0 @@

@@ -151,5 +151,15 @@ import importlib

return chat_env
chat_env = self.phases[phase].execute(chat_env,
self.chat_turn_limit_default if max_turn_step <= 0 else max_turn_step,
need_reflect)
if phase in ['ProductBacklogModification', 'SprintBacklogModification', 'SprintReview']:
while True:
try:
chat_env = self.phases[phase].execute(chat_env,
self.chat_turn_limit_default if max_turn_step <= 0 else max_turn_step,
need_reflect)
break
except: pass
else:
chat_env = self.phases[phase].execute(chat_env,
self.chat_turn_limit_default if max_turn_step <= 0 else max_turn_step,
need_reflect)
# print('@' * 20)

@@ -250,3 +260,15 @@ # print('self.phases[phase].phase_env', self.phases[phase].phase_env)

class CodeReviewChain(ComposedPhase):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def update_phase_env(self, chat_env):
pass
def update_chat_env(self, chat_env):
return chat_env
def break_cycle(self, chat_env) -> bool:
return False
class CodeReview(ComposedPhase):

@@ -317,2 +339,81 @@ def __init__(self, **kwargs):

log_and_print_online(f"**[CodeAndFormat Info]**: cannot parse the output!\n")
return False
return False
class BugFixing(ComposedPhase):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def update_phase_env(self, chat_env):
self.phase_env = dict()
def update_chat_env(self, chat_env):
chat_env.env_dict.pop('testing_commands')
return chat_env
def break_cycle(self, phase_env) -> bool:
return False
def execute(self, chat_env) -> ChatEnv:
"""
similar to Phase.execute, but add control for breaking the loop
1. receive information from environment(ComposedPhase): update the phase environment from global environment
2. for each SimplePhase in ComposedPhase
a) receive information from environment(SimplePhase)
b) check loop break
c) execute the chatting
d) change the environment(SimplePhase)
e) check loop break
3. change the environment(ComposedPhase): update the global environment using the conclusion
Args:
chat_env: global chat chain environment
Returns:
"""
self.update_phase_env(chat_env)
while len(chat_env.env_dict.get('testing_commands', [None])):
for phase_item in self.composition:
if phase_item["phaseType"] == "SimplePhase": # right now we do not support nested composition
phase = phase_item['phase']
max_turn_step = phase_item['max_turn_step']
need_reflect = check_bool(phase_item['need_reflect'])
log_and_print_online(
f"**[Execute Detail]**\n\nexecute SimplePhase:[{phase}] in ComposedPhase:[{self.phase_name}]")
if phase in self.phases:
self.phases[phase].phase_env = self.phase_env
self.phases[phase].update_phase_env(chat_env)
if self.break_cycle(self.phases[phase].phase_env):
return chat_env
chat_env = self.phases[phase].execute(chat_env,
self.chat_turn_limit_default if max_turn_step <= 0 else max_turn_step,
need_reflect)
# print('@' * 20)
# print('self.phases[phase].phase_env', self.phases[phase].phase_env)
if self.break_cycle(self.phases[phase].phase_env):
return chat_env
# chat_env = self.phases[phase].update_chat_env(chat_env)
if chat_env.env_dict.get('end-sprint', False):
return chat_env
else:
print(f"Phase '{phase}' is not yet implemented. \
Please write its config in phaseConfig.json \
and implement it in components.phase")
elif phase_item['phaseType'] == 'ComposedPhase':
phase = phase_item['phase']
cycle_num = phase_item['cycleNum']
composition = phase_item['Composition']
compose_phase_class = getattr(self.compose_phase_module, phase)
compose_phase_instance = compose_phase_class(phase_name=phase,
cycle_num=cycle_num,
composition=composition,
config_phase=self.config_phase,
config_role=self.config_role,
model_type=self.model_type,
log_filepath=self.log_filepath)
chat_env = compose_phase_instance.execute(chat_env)
else:
raise NotImplementedError
chat_env = self.update_chat_env(chat_env)
return chat_env

@@ -112,3 +112,3 @@ import logging

# ----------------------------------------
print('CHAINNNNNNN')
chat_chain.execute_chain()

@@ -115,0 +115,0 @@

[console_scripts]
agilecoder = agilecoder:main
Metadata-Version: 2.1
Name: agilecoder
Version: 0.1.4
Summary: AgileCoder
Home-page: https://github.com/FSoft-AI4Code/AgileCoder
Author: FSoft-AI4Code
Author-email: support.aic@fpt.com
License: Apache-2.0
Requires-Python: >=3.8
Requires-Dist: openai ==0.28.1
Requires-Dist: tiktoken
Requires-Dist: markdown
Requires-Dist: colorama
Requires-Dist: strsimpy ==0.2.1
Requires-Dist: python-dotenv
agilecoder/__init__.py,sha256=fb8qdnY-sSe7cf8yohr_U2Em-ZQ9PllTIGm4fMuOU_8,21
agilecoder/cli.py,sha256=apeM0kMiSdlQHCzsyJpzSCDAK5r-S_ubJlG3aXM1MM0,1082
agilecoder/run.py,sha256=c40f78LMKBnHL9FS-S7cquXc6_ZV_8K6lhNN67iFJEE,5458
agilecoder/run_api.py,sha256=VvWVZy75rPbu8buZwuY5j7BqNylUe8SIJBrZRTN2UWs,4185
agilecoder/test.py,sha256=V06NBUXWabe6OOIcm0Rqz_XBBHzC82htUGkfQfOubEs,17111
agilecoder/CompanyConfig/Agile/ChatChainConfig.json,sha256=J41wZW4x1zkzsuT03yvo-lZXX_HNgy_mKSr5uauEgFg,8599
agilecoder/CompanyConfig/Agile/PhaseConfig.json,sha256=4y7Gbu8sh3aUMSCXZD7dXIsJzTvD6Hf9ePVaHxRjCkg,38031
agilecoder/CompanyConfig/Agile/RoleConfig.json,sha256=fNYTIcCLoMR-y6c4mMmck-1HO5CgAL6hqQAR43Swj-s,8697
agilecoder/CompanyConfig/Art/ChatChainConfig.json,sha256=3hbsumAUtlCXtJZCR7lRo52uUjmAnqP2pvZ03tQC_H4,2725
agilecoder/CompanyConfig/Default/ChatChainConfig.json,sha256=vf3OsmJlJ2YJJXEoK40JIV-lOxutmys7VJy44t5zNcE,2288
agilecoder/CompanyConfig/Default/PhaseConfig.json,sha256=aU8bvoK6z8QgfMyXlKE7woQ4KWUdx6fFaleTXpbdKRw,19174
agilecoder/CompanyConfig/Default/RoleConfig.json,sha256=mnsAB3vXlxD70Y-BLEgRGF-bNYhdUlLD5JKbTLNl5IM,7188
agilecoder/camel/__init__.py,sha256=u-TqV5Rhe87DUlItZPpR0FNWL9dc5w5Kc9X1g8brb_s,1002
agilecoder/camel/configs.py,sha256=2WYu9oTS0fC9Rub_8YZx035WO0W1oNcv7TAaOvWWcC4,4237
agilecoder/camel/generators.py,sha256=zBU96-S_krfAvAST3pCyHUuI0GuCcH1BGpUAmqRLkqk,11592
agilecoder/camel/human.py,sha256=pEbAhxaCKN5Mj-PYVrFjZZMBca0RU7nvnsvAOR17RoY,4995
agilecoder/camel/model_backend.py,sha256=EX1aXfivCXqfQ8ZYno14Z3DziClFi9m5oKF-jbyJg1M,5180
agilecoder/camel/typing.py,sha256=7GXpjx4mRrPv72XMXSBdYm-niQrBS-DpnkYhN9AiTg8,2952
agilecoder/camel/utils.py,sha256=oCbDZOQ5yLrn5Oe-kYP-M5-td5FMNUT2Tefz84DjpcM,7164
agilecoder/camel/agents/__init__.py,sha256=xmrj74uWmD2vNWlt1yTGzhsX7z2X3TIZXJyzjPy40jg,1266
agilecoder/camel/agents/base.py,sha256=r6EJ_K9IMoPh2E_vKWWee9eCF8t-0xinCdVhTl-w_zg,1055
agilecoder/camel/agents/chat_agent.py,sha256=YwpcT39XiO_faAOW1jrhyy8H0DXyf5xyWUPlrsJyw4U,9139
agilecoder/camel/agents/critic_agent.py,sha256=Ytt6rwWY4-eYzQlGXiwGky7PPBUX7RcrRevlKy0pctA,7116
agilecoder/camel/agents/embodied_agent.py,sha256=ItKGoMj-ZREZ9RoQ62Sm6-hL0zWkYXJVU5B3my5z8Yc,5530
agilecoder/camel/agents/role_playing.py,sha256=coePwlscpcYl90K05B_u--Kl7TBj08_C_W0mYoEUsck,14061
agilecoder/camel/agents/task_agent.py,sha256=jresntccydtx39cJFNp0aXKvH1ddCC4dPiUZnEHQmGU,6436
agilecoder/camel/agents/tool_agents/__init__.py,sha256=ulTNWU2qoFGe3pvVmCq_sdfeSX3NKZ0due66TYvsL-M,862
agilecoder/camel/agents/tool_agents/base.py,sha256=VHITX2g-mYAjoW9FFHTgxAX2RrGd2rQkPU7ES55neQ4,1220
agilecoder/camel/agents/tool_agents/hugging_face_tool_agent.py,sha256=h9_C5cUwCtH3THV6lJxx01jAFDrtJeDs3p2TLOc0qig,8034
agilecoder/camel/messages/__init__.py,sha256=LWYGk-x5u0in0SvN_ljZ3bwJC_5QRJAPKs5I9P2yvT8,1983
agilecoder/camel/messages/base.py,sha256=OfBa7qSDodwUt8BZ_6Gzq_0oYX4CkWGGSkREpr5-XR0,11067
agilecoder/camel/messages/chat_messages.py,sha256=OQela70_6AkMVzMgoULbzFNjZwgbCNs1_2OQk910Cvc,3283
agilecoder/camel/messages/system_messages.py,sha256=1Cps7WPzvbw7ZOa80jvGGo4YWMUYICGARnY67E9Zz_8,3078
agilecoder/camel/prompts/__init__.py,sha256=lUDEY0_rxV8kzwxFSyoj_wLcWhGanUYyBGNFYl_7nms,992
agilecoder/camel/prompts/base.py,sha256=pmMYg82Sd4UGhKPZ97riM_tTg1HzcCUTPmEzFlYemMw,8400
agilecoder/camel/prompts/prompt_templates.py,sha256=IoDgDIswdejvEkcf2vCZEv9CFHoWaZjj9CoI8kVgvSI,4089
agilecoder/camel/prompts/task_prompt_template.py,sha256=mDUYvME1VAuhPpwEcL7wMl0sAMdJAPak9Wky8_zVuEA,1813
agilecoder/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
agilecoder/components/chat_chain.py,sha256=QP9mE8ab4hQNP_sQf4TVlRMSt8WvP3Ek2Nb1J5j5ALM,14845
agilecoder/components/chat_env.py,sha256=JmB9y094C-ci_i69qDeK4o7rEKjeiLPhyPxJG9Ju3co,18290
agilecoder/components/codes.py,sha256=1WMSqfA_wMTOVg2-Rc94GYd973i0j87GV2lUJM1ZPZA,10706
agilecoder/components/composed_phase.py,sha256=z7r-RiIFwmCE0KO55gvShoWMpHwCQ_URhb0nXB9Q5AM,11474
agilecoder/components/documents.py,sha256=7xJcI8aIeiRg6mfIwXRdHuZI6mr-3-DEmdHPO6W_wjo,1967
agilecoder/components/phase.py,sha256=aQydQ8-WfDmr9w6iEj2xsD0bWD-oFMiORagZSC4-aVs,64173
agilecoder/components/roster.py,sha256=2tUElCiDVHh0zDo38d6M9W9DmuCJrq3b5vsyA3F_QTo,658
agilecoder/components/statistics.py,sha256=S7uVLc1MGQiNMmqISWO02-Xtl_b6REik7BQf2Jsc-oM,5794
agilecoder/components/utils.py,sha256=BkIoimiFJ7vdCvFUqcgm2f-LhdP8Uu20KNUOFXKuS_U,3489
agilecoder/online_log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
agilecoder/online_log/app.py,sha256=Lg2GthOMDjrIp-AeTRMe8ExmRyLaIsMfVn3M0IhDNa8,5360
agilecoder-0.1.4.dist-info/METADATA,sha256=q2c1R0Xfws5op95xepkT45ItvDbDZfIe6Nug7XaWCiA,393
agilecoder-0.1.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
agilecoder-0.1.4.dist-info/entry_points.txt,sha256=eu_LrV5hY9ZTbd50IbL_YOWsyQ1Bd2moqgNcVw8MRFo,47
agilecoder-0.1.4.dist-info/top_level.txt,sha256=w78iZRx9gMa7npsZdRBeYghJV_c6YNeSgpdew8OpAbE,11
agilecoder-0.1.4.dist-info/RECORD,,
agilecoder
Wheel-Version: 1.0
Generator: bdist_wheel (0.42.0)
Root-Is-Purelib: true
Tag: py3-none-any

Sorry, the diff of this file is too big to display