diff --git a/scripts/mma_exec.py b/scripts/mma_exec.py index 3fac2a0..96e06cb 100644 --- a/scripts/mma_exec.py +++ b/scripts/mma_exec.py @@ -134,11 +134,17 @@ def execute_agent(role: str, prompt: str, docs: list[str]) -> str: except Exception as e: print(f"Error generating skeleton for {dep_file}: {e}") - command_text = f"Use the mma-{role} skill. {injected_context}{prompt}" + # MMA Protocol: Tier 3 and 4 are stateless and tool-less. + system_directive = f"STRICT SYSTEM DIRECTIVE: You are a stateless {role}. " \ + "DO NOT USE ANY TOOLS (no write_file, no run_shell_command, etc.). " \ + "ONLY output the requested text, code, or diff. No pleasantries." + + command_text = f"{system_directive}\n\nUse the mma-{role} skill. {injected_context}{prompt}" for doc in docs: command_text += f" @{doc}" - cmd = ['gemini', '-p', command_text, '--output-format', 'json', '--model', model] + # Use --approval-mode plan to ensure the agent is in read-only mode. + cmd = ['gemini', '-p', command_text, '--output-format', 'json', '--model', model, '--approval-mode', 'plan'] try: process = subprocess.run(cmd, capture_output=True, text=True, shell=True) if not process.stdout and process.stderr: