|
|
|
|
|
""" |
|
@Time : 2023/5/11 14:43 |
|
@Author : alexanderwu |
|
@File : architect.py |
|
""" |
|
|
|
|
|
from metagpt.actions import WritePRD |
|
from metagpt.actions.design_api import WriteDesign |
|
from metagpt.roles.role import Role |
|
|
|
|
|
class Architect(Role): |
|
""" |
|
Represents an Architect role in a software development process. |
|
|
|
Attributes: |
|
name (str): Name of the architect. |
|
profile (str): Role profile, default is 'Architect'. |
|
goal (str): Primary goal or responsibility of the architect. |
|
constraints (str): Constraints or guidelines for the architect. |
|
""" |
|
|
|
name: str = "Bob" |
|
profile: str = "Architect" |
|
goal: str = "design a concise, usable, complete software system" |
|
constraints: str = ( |
|
"make sure the architecture is simple enough and use appropriate open source " |
|
"libraries. Use same language as user requirement" |
|
) |
|
|
|
def __init__(self, **kwargs) -> None: |
|
super().__init__(**kwargs) |
|
|
|
self.set_actions([WriteDesign]) |
|
|
|
|
|
self._watch({WritePRD}) |
|
|