graph TD A[Start] --> B{Subagent details provided?} B -->|No| C[Cannot create subagent flow] B -->|Yes| D[Analyze subagent description] D --> E{Enough context to design workflow?} E -->|No| F[Request more information] E -->|Yes| G[Identify subagent purpose and goals] G --> H[Map relevant skills to subagent tasks] H --> I[Break down subagent flow into steps] I --> J[Determine inputs and outputs for each step] J --> K[Identify dependencies between steps] K --> L[Create Mermaid flowchart of subagent workflow] L --> M[Integrate subagent flow into overall agent diagram] M --> N[Review and refine subagent design] N --> O[Implement subagent in agent workflow] O --> P[Test and validate subagent functionality] P --> Q{Subagent performing as expected?} Q -->|No| R[Debug and optimize subagent] R --> P Q -->|Yes| S[Subagent ready for deployment] S --> T[End]