feat(mma): Implement Context Amnesia bridge via subprocess

This commit is contained in:
2026-02-25 19:16:41 -05:00
parent facfa070bb
commit 9a27a80d65
2 changed files with 47 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import argparse
import subprocess
def get_role_documents(role: str) -> list[str]:
if role == 'tier1':
@@ -9,6 +10,15 @@ def get_role_documents(role: str) -> list[str]:
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(
@@ -27,11 +37,11 @@ def create_parser():
def main():
parser = create_parser()
args = parser.parse_args()
print(f"Role: {args.role}")
print(f"Prompt: {args.prompt}")
docs = get_role_documents(args.role)
print(f"Selected Documents: {docs}")
print(f"Executing role: {args.role} with docs: {docs}")
result = execute_agent(args.role, args.prompt, docs)
print(result)
if __name__ == "__main__":
main()