some organization pass, still need to review a bunch
This commit is contained in:
+9
-15
@@ -6,7 +6,7 @@ from src.models import Tool, ToolPreset, BiasProfile
|
||||
class ToolBiasEngine:
|
||||
def apply_semantic_nudges(self, tool_definitions: List[Dict[str, Any]], preset: ToolPreset) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
[C: tests/test_tool_bias.py:test_apply_semantic_nudges, tests/test_tool_bias.py:test_parameter_bias_nudging]
|
||||
[C: tests/test_tool_bias.py:test_apply_semantic_nudges, tests/test_tool_bias.py:test_parameter_bias_nudging]
|
||||
"""
|
||||
weight_map = {
|
||||
5: "[HIGH PRIORITY] ",
|
||||
@@ -42,7 +42,7 @@ class ToolBiasEngine:
|
||||
|
||||
def generate_tooling_strategy(self, preset: ToolPreset, global_bias: BiasProfile) -> str:
|
||||
"""
|
||||
[C: tests/test_tool_bias.py:test_generate_tooling_strategy]
|
||||
[C: tests/test_tool_bias.py:test_generate_tooling_strategy]
|
||||
"""
|
||||
lines = ["### Tooling Strategy"]
|
||||
|
||||
@@ -51,23 +51,17 @@ class ToolBiasEngine:
|
||||
for cat_tools in preset.categories.values():
|
||||
for t in cat_tools:
|
||||
if not isinstance(t, Tool): continue
|
||||
if t.weight >= 5:
|
||||
preferred.append(f"{t.name} [HIGH PRIORITY]")
|
||||
elif t.weight == 4:
|
||||
preferred.append(f"{t.name} [PREFERRED]")
|
||||
elif t.weight == 2:
|
||||
low_priority.append(f"{t.name} [NOT RECOMMENDED]")
|
||||
elif t.weight <= 1:
|
||||
low_priority.append(f"{t.name} [LOW PRIORITY]")
|
||||
if t.weight >= 5: preferred.append(f"{t.name} [HIGH PRIORITY]")
|
||||
elif t.weight == 4: preferred.append(f"{t.name} [PREFERRED]")
|
||||
elif t.weight == 2: low_priority.append(f"{t.name} [NOT RECOMMENDED]")
|
||||
elif t.weight <= 1: low_priority.append(f"{t.name} [LOW PRIORITY]")
|
||||
|
||||
if preferred:
|
||||
lines.append(f"Preferred tools: {', '.join(preferred)}.")
|
||||
if low_priority:
|
||||
lines.append(f"Low-priority tools: {', '.join(low_priority)}.")
|
||||
if preferred: lines.append(f"Preferred tools: {', '.join(preferred)}.")
|
||||
if low_priority: lines.append(f"Low-priority tools: {', '.join(low_priority)}.")
|
||||
|
||||
if global_bias.category_multipliers:
|
||||
lines.append("Category focus multipliers:")
|
||||
for cat, mult in global_bias.category_multipliers.items():
|
||||
lines.append(f"- {cat}: {mult}x")
|
||||
|
||||
return "\n\n".join(lines)
|
||||
return "\n\n".join(lines)
|
||||
|
||||
Reference in New Issue
Block a user