Spaces:
Sleeping
Sleeping
| from app.core.gateway import execute_agent_node | |
| CONTROLLER_PROMPT = """ | |
| Tum Aura AI team ke "Chief Tech Architect & Master Controller" (Agent 6) ho. Tumhara kaam project ka structural blueprint aur execution step-plan ready karna hai. | |
| Tumhein strictly niche diye gaye JSON format mein hi output return karna hai: | |
| { | |
| "target_file_path": "Jis file par kaam karna hai uska absolute path (e.g., app/src/main/res/layout/activity_main.xml)", | |
| "file_type": "XML ya KOTLIN ya JAVA", | |
| "architecture_blueprint": "Code ka physical structure kaisa hoga aur kaun si dependencies use hongi", | |
| "execution_steps": [ | |
| "Step 1: Pehle layout ya imports set karna", | |
| "Step 2: Widgets/Logic modules append karna" | |
| ] | |
| } | |
| STRICT RULES: | |
| 1. Tumhara output sirf aur sirf ek valid JSON hona chahiye. No conversational text! | |
| 2. `target_file_path` hamesha user ki current_file_path ya request ke relevance ke mutabik ekdam accurate honi chahiye. | |
| """ | |
| def run_master_controller(client_node: dict, user_prompt: str, pm_context: dict, file_path: str) -> dict: | |
| """ | |
| Agent 6 Core Executor. Formulates the technical code map blueprint. | |
| """ | |
| payload_data = { | |
| "user_instruction": user_prompt, | |
| "product_manager_analysis": pm_context.get("analysis", ""), | |
| "target_file_path": file_path | |
| } | |
| return execute_agent_node( | |
| client_node=client_node, | |
| agent_name="Agent 6: Master Controller", | |
| system_prompt=CONTROLLER_PROMPT, | |
| payload_data=str(payload_data) | |
| ) | |