Skip to content

"Vibe-Trading: Your Personal Trading Agent"

fix(swarm): register value_investing_committee in the routing table

sambazhu5c438c0d375e
diff --git a/agent/src/tools/swarm_tool.py b/agent/src/tools/swarm_tool.py
index fa8911999..70e3486c4 100644
--- a/agent/src/tools/swarm_tool.py
+++ b/agent/src/tools/swarm_tool.py
@@ -234,6 +234,22 @@ _PRESET_KEYWORDS: list[tuple[str, list[str], float]] = [
],
0.9,
),
+ (
+ "value_investing_committee",
+ [
+ r"value\s+investing",
+ "价值投资",
+ r"\bbuffett\b",
+ "巴菲特",
+ r"\bmunger\b",
+ "芒格",
+ "段永平",
+ "李录",
+ "四大师",
+ r"four\s+master",
+ ],
+ 0.9,
+ ),
(
"investment_committee",
[
@@ -609,6 +625,7 @@ def _build_variables(preset_name: str, prompt: str) -> dict[str, str]:
"geopolitical_war_room": {"crisis": g, "market": market},
"pairs_research_lab": {"market": market, "sector": _extract_sector(prompt)},
"investment_committee": {"target": g, "market": market},
+ "value_investing_committee": {"company": g, "market": market},
"macro_strategy_forum": {"market": market, "horizon": "quarterly"},
"statistical_arbitrage_desk": {"market": market, "goal": g, "sector": _extract_sector(prompt)},
"sentiment_intelligence_team": {"market": market, "timeframe": "daily"},
diff --git a/agent/tests/test_swarm_presets_packaging.py b/agent/tests/test_swarm_presets_packaging.py
index 5e03df359..96b5e98d5 100644
--- a/agent/tests/test_swarm_presets_packaging.py
+++ b/agent/tests/test_swarm_presets_packaging.py
@@ -39,6 +39,14 @@ def test_list_presets_returns_full_roster() -> None:
)
+def test_value_investing_committee_is_routable() -> None:
+ """value_investing_committee must be in the routing table, not just on disk."""
+ from src.tools.swarm_tool import _PRESET_NAMES, _normalize_preset_name
+
+ assert "value_investing_committee" in _PRESET_NAMES
+ assert _normalize_preset_name("value_investing_committee") == "value_investing_committee"
+
+
def test_every_preset_yaml_is_loadable() -> None:
"""Every YAML in the bundle must parse and expose required keys."""
for entry in list_presets():