From 74dcd89ec5d6ad37c2e53a4802d7b9f3f1633af7 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 25 Feb 2026 22:26:59 -0500 Subject: [PATCH] mma execution fix --- scripts/mma_exec.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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: