feat(mma): Phase 1 — source_tier tagging at emission

- ai_client: add current_tier module var; stamp source_tier on every _append_comms entry
- multi_agent_conductor: set current_tier='Tier 3' around send(), clear in finally
- conductor_tech_lead: set current_tier='Tier 2' around send(), clear in finally
- gui_2: _on_tool_log captures current_tier; _append_tool_log stores dict with source_tier
- tests: 8 new tests covering current_tier, source_tier in comms, tool log dict format
This commit is contained in:
2026-03-02 16:18:00 -05:00
parent 264b04f060
commit 8d9f25d0ce
5 changed files with 152 additions and 14 deletions

View File

@@ -19,6 +19,7 @@ def generate_tickets(track_brief: str, module_skeletons: str) -> list[dict]:
# Set custom system prompt for this call
old_system_prompt = ai_client._custom_system_prompt
ai_client.set_custom_system_prompt(system_prompt)
ai_client.current_tier = "Tier 2"
try:
# 3. Call Tier 2 Model
response = ai_client.send(
@@ -41,11 +42,11 @@ def generate_tickets(track_brief: str, module_skeletons: str) -> list[dict]:
return tickets
except Exception as e:
print(f"Error parsing Tier 2 response: {e}")
# print(f"Raw response: {response}")
return []
finally:
# Restore old system prompt
# Restore old system prompt and clear tier tag
ai_client.set_custom_system_prompt(old_system_prompt)
ai_client.current_tier = None
from dag_engine import TrackDAG
from models import Ticket