feat: turn HN monitor into an agentic radar

Merged
KH
3mo ago
+1200-117

Summary

  • scan Front Page, Show HN, and New HN with AgentWorkforce-aligned relevance scoring
  • post a compact Slack header with a rich threaded digest
  • answer Slack, Telegram, and relay follow-ups with live HN details and top comments
  • add deterministic HTTP-backed eval fixtures and a read-only live preview command
  • document the dev Mac-mini proactive-run gate through Tailscale Funnel

Validation

  • npm run typecheck
  • npm run test:hn — 14/14
  • npm run evals:hn — 2/2
  • deployed dev persona dry-run: Slack integration + schedule validated

Runtime companion

The Mac-mini proactive execution contract and Funnel runbook are merged in AgentWorkforce/cloud#2613 and #2611.


Summary by cubic

Turns the HN monitor into an agentic radar that scans Front Page, Show HN, and New, ranks stories by agent-infra relevance, and posts a compact Slack header with a rich threaded digest. Adds Slack @mention, Telegram, and relay Q&A that hydrates live HN details and top comments.

  • New Features

    • Multi-feed scan with agent-infra relevance scoring and deduped feed provenance.
    • Slack-first digest: compact header + threaded body with category, points/comments, source, and “why it matters”.
    • Q&A: reply to Slack thread mentions, Telegram, and relay DMs; hydrates story details and top HN comments before answering.
    • Deterministic evals: HTTP fixtures for HN feeds/items; npm run evals:hn and npm run test:hn.
    • Read-only live preview: npm run preview:hn (fetches + formats, no model/memory/delivery).
    • Resilient delivery: pending-thread recovery, improved memory records, and LLM fallback.
    • Persona updates: clearer system prompt; Slack app_mention trigger; configurable LOOKBACK_HOURS and MAX_STORIES.
  • Migration

    • Configure SLACK_CHANNEL and/or TELEGRAM_CHAT. Optional: tune TOPICS; new LOOKBACK_HOURS (default 24) and MAX_STORIES (default 8).
    • Inner loop: npm run test:hn, npm run evals:hn, npm run preview:hn.
    • Mac mini gate: deploy with SANDBOX_PROVIDER=local and LOCAL_SANDBOX_URL (Tailscale Funnel); trigger via agentworkforce trigger hn-monitor and tail logs.