Skip to content

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

fix: avoid enterprise boilerplate in company size inference

Trevin Chowdab238ea7fb5
diff --git a/.gitignore b/.gitignore
index 7b7b27e5..2a7b02ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ htmlcov/
# Internal planning docs (ce:plan output) — keep local, don't publish
docs/plans/
+docs/brainstorms/
.context/
/work
diff --git a/skills/last30days/scripts/lib/hiring_signals.py b/skills/last30days/scripts/lib/hiring_signals.py
index 7a169778..e4e7de91 100644
--- a/skills/last30days/scripts/lib/hiring_signals.py
+++ b/skills/last30days/scripts/lib/hiring_signals.py
@@ -96,6 +96,14 @@ def analyze(
def infer_company_size(items: list[schema.SourceItem], *, topic: str = "") -> str:
"""Infer a coarse company-size tier from jobs evidence."""
+ topic_lower = topic.lower()
+ firmographic_text = " ".join(
+ " ".join([
+ str(item.metadata.get("company_size") or ""),
+ topic,
+ ])
+ for item in items
+ ).lower()
text = " ".join(
" ".join([
item.title,
@@ -111,9 +119,9 @@ def infer_company_size(items: list[schema.SourceItem], *, topic: str = "") -> st
# never the job-description body - JDs list enterprise customers (e.g.
# "trusted by Microsoft, Google"), which would misclassify a startup as
# mega-cap and suppress its real signals.
- if re.search(r"\b(apple|uber|google|microsoft|amazon|meta|netflix)\b", topic.lower()):
+ if re.search(r"\b(apple|uber|google|microsoft|amazon|meta|netflix)\b", topic_lower):
return "mega-cap"
- if count >= 200 or re.search(r"\b(fortune 500|thousands of employees)\b", text):
+ if count >= 200 or re.search(r"\b(fortune 500|thousands of employees)\b", firmographic_text):
return "large-enterprise"
if count >= 35 or re.search(r"\b(series [cd]|public company)\b", text):
return "growth"
diff --git a/tests/test_hiring_signals.py b/tests/test_hiring_signals.py
index b6199d62..ae7ef0de 100644
--- a/tests/test_hiring_signals.py
+++ b/tests/test_hiring_signals.py
@@ -39,6 +39,23 @@ class HiringSignalsTests(unittest.TestCase):
self.assertEqual("mega-cap", summary["company_size_tier"])
self.assertIn("too diffuse", summary["omitted_reason"])
+ def test_fortune_500_customer_boilerplate_does_not_make_startup_large_enterprise(self):
+ items = [
+ job(
+ "Founding Enterprise Solutions Engineer",
+ "Help Fortune 500 customers adopt SSO, SOC 2, and procurement workflows.",
+ "Sales",
+ ),
+ job(
+ "Security Platform Engineer",
+ "Build enterprise security, audit, and admin workflows for Fortune 500 customers.",
+ "Engineering",
+ ),
+ ]
+ summary = hiring_signals.analyze(items, explicit=False, topic="Listen Labs")
+ self.assertEqual("startup", summary["company_size_tier"])
+ self.assertTrue(summary["include"])
+
def test_explicit_mode_keeps_low_confidence_signal(self):
items = [job("Customer Success Manager", "support enterprise customers", "Success")]
summary = hiring_signals.analyze(items, explicit=True, topic="Acme")