conductor(plan): Mark Phase 1 of DeepSeek track as verified
This commit is contained in:
@@ -120,6 +120,10 @@ def execute_agent(role: str, prompt: str, docs: list[str]) -> str:
|
||||
|
||||
# Advanced Context: Dependency skeletons for Tier 3
|
||||
injected_context = ""
|
||||
# Whitelist of modules that sub-agents have "unfettered" (full) access to.
|
||||
# These will be provided in full if imported, instead of just skeletons.
|
||||
UNFETTERED_MODULES = ['mcp_client', 'project_manager']
|
||||
|
||||
if role in ['tier3', 'tier3-worker']:
|
||||
for doc in docs:
|
||||
if doc.endswith('.py') and os.path.exists(doc):
|
||||
@@ -129,15 +133,20 @@ def execute_agent(role: str, prompt: str, docs: list[str]) -> str:
|
||||
dep_file = f"{dep}.py"
|
||||
if os.path.exists(dep_file) and dep_file != doc:
|
||||
try:
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
skeleton = generate_skeleton(f.read())
|
||||
injected_context += f"\n\nDEPENDENCY SKELETON: {dep_file}\n{skeleton}\n"
|
||||
if dep in UNFETTERED_MODULES:
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
full_content = f.read()
|
||||
injected_context += f"\n\nFULL MODULE CONTEXT: {dep_file}\n{full_content}\n"
|
||||
else:
|
||||
with open(dep_file, 'r', encoding='utf-8') as f:
|
||||
skeleton = generate_skeleton(f.read())
|
||||
injected_context += f"\n\nDEPENDENCY SKELETON: {dep_file}\n{skeleton}\n"
|
||||
except Exception as e:
|
||||
print(f"Error generating skeleton for {dep_file}: {e}")
|
||||
print(f"Error gathering context for {dep_file}: {e}")
|
||||
|
||||
# Check for token-bloat safety: if injected_context is too large, truncate it
|
||||
if len(injected_context) > 10000:
|
||||
injected_context = injected_context[:10000] + "... [TRUNCATED FOR COMMAND LINE LIMITS]"
|
||||
if len(injected_context) > 15000:
|
||||
injected_context = injected_context[:15000] + "... [TRUNCATED FOR COMMAND LINE LIMITS]"
|
||||
|
||||
# MMA Protocol: Tier 3 and 4 are stateless and tool-less.
|
||||
system_directive = f"STRICT SYSTEM DIRECTIVE: You are a stateless {role}. " \
|
||||
|
||||
Reference in New Issue
Block a user