feat(mma): Implement logging/auditing for role hand-offs
This commit is contained in:
@@ -76,7 +76,22 @@ def get_role_documents(role: str) -> list[str]:
|
||||
return ['conductor/workflow.md']
|
||||
return []
|
||||
|
||||
LOG_FILE = 'logs/mma_delegation.log'
|
||||
|
||||
def log_delegation(role, prompt):
|
||||
import os
|
||||
import datetime
|
||||
os.makedirs(os.path.dirname(LOG_FILE), exist_ok=True)
|
||||
timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
with open(LOG_FILE, 'a') as f:
|
||||
f.write("--------------------------------------------------\n")
|
||||
f.write(f"TIMESTAMP: {timestamp}\n")
|
||||
f.write(f"TIER: {role}\n")
|
||||
f.write(f"PROMPT: {prompt}\n")
|
||||
f.write("--------------------------------------------------\n")
|
||||
|
||||
def execute_agent(role: str, prompt: str, docs: list[str]) -> str:
|
||||
log_delegation(role, prompt)
|
||||
model = get_model_for_role(role)
|
||||
command_text = f"Use the mma-{role} skill. {prompt}"
|
||||
for doc in docs:
|
||||
|
||||
Reference in New Issue
Block a user