Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

Loosen source tiering for usage queries

Jeffrey Sperlingb48966345082
diff --git a/scripts/lib/query_type.py b/scripts/lib/query_type.py
index 36d325dc..bc48c857 100644
--- a/scripts/lib/query_type.py
+++ b/scripts/lib/query_type.py
@@ -16,7 +16,8 @@ _OPINION_PATTERNS = re.compile(
r"\b(worth it|thoughts on|opinion|review|experience with|recommend|should i|pros and cons|good or bad)\b", re.I
)
_HOWTO_PATTERNS = re.compile(
- r"\b(how to|tutorial|step by step|setup|install|configure|deploy|migrate|implement|build a|create a)\b", re.I
+ r"\b(how to|tutorial|step by step|setup|install|configure|deploy|migrate|implement|build a|create a|prompting|prompts?|best practices|tips|examples|animation|animations)\b",
+ re.I,
)
_COMPARISON_PATTERNS = re.compile(
r"\b(vs\.?|versus|compared to|comparison|better than|difference between|switch from)\b", re.I
@@ -62,10 +63,10 @@ SOURCE_TIERS = {
"product": {"tier1": {"reddit", "x", "youtube"}, "tier2": {"web", "tiktok"}},
"concept": {"tier1": {"reddit", "hn", "web"}, "tier2": {"youtube", "x"}},
"opinion": {"tier1": {"reddit", "x"}, "tier2": {"youtube", "bluesky"}},
- "how_to": {"tier1": {"youtube", "reddit", "hn"}, "tier2": {"web"}},
+ "how_to": {"tier1": {"youtube", "reddit", "hn"}, "tier2": {"web", "x"}},
"comparison": {"tier1": {"reddit", "hn", "youtube"}, "tier2": {"x", "web"}},
- "breaking_news": {"tier1": {"x", "reddit", "web"}, "tier2": {"hn", "bluesky"}},
- "prediction": {"tier1": {"polymarket", "x", "reddit"}, "tier2": {"web"}},
+ "breaking_news": {"tier1": {"x", "reddit", "web"}, "tier2": {"hn", "bluesky", "youtube"}},
+ "prediction": {"tier1": {"polymarket", "x", "reddit"}, "tier2": {"web", "hn", "youtube"}},
}
# WebSearch penalty adjustment by query type.
diff --git a/tests/test_query_type.py b/tests/test_query_type.py
index c07f3438..bd364101 100644
--- a/tests/test_query_type.py
+++ b/tests/test_query_type.py
@@ -35,6 +35,8 @@ class TestDetectQueryType(unittest.TestCase):
self.assertEqual(detect_query_type("how to deploy on Vercel"), "how_to")
self.assertEqual(detect_query_type("tutorial for building MCP servers"), "how_to")
self.assertEqual(detect_query_type("step by step Kubernetes setup"), "how_to")
+ self.assertEqual(detect_query_type("nano banana pro prompting"), "how_to")
+ self.assertEqual(detect_query_type("remotion animations for Claude Code"), "how_to")
def test_comparison_queries(self):
self.assertEqual(detect_query_type("cursor vs windsurf"), "comparison")
@@ -87,6 +89,9 @@ class TestIsSourceEnabled(unittest.TestCase):
def test_tier2_sources_enabled(self):
self.assertTrue(is_source_enabled("web", "product"))
self.assertTrue(is_source_enabled("bluesky", "opinion"))
+ self.assertTrue(is_source_enabled("x", "how_to"))
+ self.assertTrue(is_source_enabled("youtube", "breaking_news"))
+ self.assertTrue(is_source_enabled("hn", "prediction"))
def test_tier3_sources_disabled_by_default(self):
self.assertFalse(is_source_enabled("instagram", "concept"))