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: address hiring signals review feedback

Trevin Chowe25a550e90ad
diff --git a/skills/last30days/scripts/lib/pipeline.py b/skills/last30days/scripts/lib/pipeline.py
index 0578c555..f3eb6659 100644
--- a/skills/last30days/scripts/lib/pipeline.py
+++ b/skills/last30days/scripts/lib/pipeline.py
@@ -633,8 +633,6 @@ def _company_topic_likely(topic: str) -> bool:
if not text:
return False
lower = text.lower()
- if " vs " in lower or " versus " in lower:
- return True
if "?" in text or len(text.split()) > 4:
return False
generic = {
@@ -643,7 +641,13 @@ def _company_topic_likely(topic: str) -> bool:
}
if any(word in generic for word in lower.split()):
return False
- return bool(text[:1].isupper() or len(text.split()) == 1)
+ if " vs " in lower or " versus " in lower:
+ return True
+ known_single_word_companies = {
+ "apple", "uber", "google", "microsoft", "amazon", "meta", "netflix",
+ "openai", "anthropic", "qualtrics",
+ }
+ return bool(text[:1].isupper() or lower in known_single_word_companies)
def _warnings(
diff --git a/skills/last30days/scripts/lib/render.py b/skills/last30days/scripts/lib/render.py
index 59b5e02b..ba4a38e3 100644
--- a/skills/last30days/scripts/lib/render.py
+++ b/skills/last30days/scripts/lib/render.py
@@ -213,12 +213,13 @@ def render_for_html(
*_render_badge(),
*_render_html_metadata(report),
]
+ hiring_block = _render_hiring_signals(report)
if synthesis_md:
lines.extend(["", synthesis_md.strip()])
- else:
- hiring_block = _render_hiring_signals(report)
- if hiring_block:
+ if hiring_block and "## Hiring Signals" not in synthesis_md:
lines.extend(["", *hiring_block])
+ elif hiring_block:
+ lines.extend(["", *hiring_block])
# Data quality warnings are NOT rendered into the HTML artifact. The HTML
# is meant to be shared (Slack, email, Notion); recipients haven't asked
# for technical commentary about how the run was produced. Generators see
@@ -952,6 +953,9 @@ def render_context(report: schema.Report, cluster_limit: int = 6) -> str:
freshness_warning = _assess_data_freshness(report)
if freshness_warning:
lines.append(f"Freshness warning: {freshness_warning}")
+ hiring_block = _render_hiring_signals(report)
+ if hiring_block:
+ lines.extend(["", *hiring_block, ""])
lines.append("Top clusters:")
for cluster in report.clusters[:cluster_limit]:
lines.append(f"- {cluster.title} [{', '.join(_source_label(source) for source in cluster.sources)}]")
diff --git a/tests/test_pipeline_v3.py b/tests/test_pipeline_v3.py
index dcc4afa4..8e99acae 100644
--- a/tests/test_pipeline_v3.py
+++ b/tests/test_pipeline_v3.py
@@ -122,6 +122,26 @@ class PipelineV3Tests(unittest.TestCase):
self.assertNotIn("jobs", report.items_by_source)
self.assertNotIn("hiring_signals", report.artifacts)
+ def test_single_word_generic_topic_does_not_add_jobs(self):
+ report = pipeline.run(
+ topic="bitcoin",
+ config={"LAST30DAYS_REASONING_PROVIDER": "gemini"},
+ depth="quick",
+ mock=True,
+ )
+ self.assertNotIn("jobs", report.items_by_source)
+ self.assertNotIn("hiring_signals", report.artifacts)
+
+ def test_question_comparison_topic_does_not_add_jobs(self):
+ report = pipeline.run(
+ topic="Python vs Ruby benchmark?",
+ config={"LAST30DAYS_REASONING_PROVIDER": "gemini"},
+ depth="quick",
+ mock=True,
+ )
+ self.assertNotIn("jobs", report.items_by_source)
+ self.assertNotIn("hiring_signals", report.artifacts)
+
def test_standard_mode_omits_weak_large_company_jobs_signal(self):
with patch("lib.pipeline._retrieve_stream") as mock_retrieve:
def fake_retrieve(**kwargs):
diff --git a/tests/test_render_hiring_signals.py b/tests/test_render_hiring_signals.py
index 95fb8186..10dbe46f 100644
--- a/tests/test_render_hiring_signals.py
+++ b/tests/test_render_hiring_signals.py
@@ -54,6 +54,16 @@ class RenderHiringSignalsTests(unittest.TestCase):
html_md = render.render_for_html(report)
self.assertIn("Hiring Signals", html_md)
self.assertIn("[Enterprise Security Engineer](https://example.com/jobs/1)", html_md)
+ synthesized_html_md = render.render_for_html(
+ report,
+ synthesis_md="What I learned:\n\nHiring points toward enterprise readiness.",
+ )
+ self.assertIn("What I learned", synthesized_html_md)
+ self.assertIn("Hiring Signals", synthesized_html_md)
+ self.assertIn("[Enterprise Security Engineer](https://example.com/jobs/1)", synthesized_html_md)
+ context = render.render_context(report)
+ self.assertIn("Hiring Signals", context)
+ self.assertIn("[Enterprise Security Engineer](https://example.com/jobs/1)", context)
def test_standard_mode_omits_weak_signal(self):
report = schema.Report(