Files
manual_slop/scripts/mma_exec.py

47 lines
1.3 KiB
Python

import argparse
import subprocess
def get_role_documents(role: str) -> list[str]:
if role == 'tier1':
return ['conductor/product.md', 'conductor/product-guidelines.md']
elif role == 'tier2':
return ['conductor/tech-stack.md', 'conductor/workflow.md']
elif role == 'tier3':
return ['conductor/workflow.md']
return []
def execute_agent(role: str, prompt: str, docs: list[str]) -> str:
command_text = f"Activate the mma-{role} skill. {prompt}"
for doc in docs:
command_text += f" @{doc}"
cmd = ["gemini", command_text]
process = subprocess.run(cmd, capture_output=True, text=True)
return process.stdout
def create_parser():
parser = argparse.ArgumentParser(description="MMA Execution Script")
parser.add_argument(
"--role",
choices=['tier1', 'tier2', 'tier3', 'tier4'],
required=True,
help="The tier role to execute"
)
parser.add_argument(
"prompt",
type=str,
help="The prompt for the tier"
)
return parser
def main():
parser = create_parser()
args = parser.parse_args()
docs = get_role_documents(args.role)
print(f"Executing role: {args.role} with docs: {docs}")
result = execute_agent(args.role, args.prompt, docs)
print(result)
if __name__ == "__main__":
main()