from core.base_agent import BaseAgent from core.database import db from typing import Dict, Any class DesignerAgent(BaseAgent): def __init__(self): super().__init__("Designer") self.create_chain(""" You are a Software Designer. Your task is to create detailed design specifications from the given user stories. User Stories: {input} Create a comprehensive design document that includes: 1. System Architecture 2. Component Design 3. Database Schema 4. API Endpoints 5. Data Flow Diagrams 6. Security Considerations Please provide a detailed, implementable design that follows best practices and design patterns. """) async def create_design(self, user_stories: str) -> Dict[str, Any]: """Create design specifications from user stories""" result = await self.process({"input": user_stories}) # Store the design in the database db.store_artifact( "designs", result, { "type": "design", "source": "designer", "status": "created" } ) return { "status": "success", "design": result, "message": "Design specifications created successfully" }