Guide

Trending News architecture

Pipeline, storage, and Nexus system registration for @prc/agents-trending-news.

Workflow

Workflow ID: prc-agents-trending-news/daily-analysis

StepAbility
fetchprc-agents-trending-news/fetch-headlines
filterprc-agents-trending-news/filter-and-deduplicate
categorizeprc-agents-trending-news/extract-categories
enrichprc-agents-trending-news/enrich-with-related-posts
rankprc-agents-trending-news/rank-by-importance
analyzeprc-agents-trending-news/analyze-stories

Triggers: on-demand via prc-agents-trending-news/trending-news-analysis (Run_Analysis) or WP-CLI (wp prc agents-trending-news run). The daily Action Scheduler cron (0 6 * * *) was removed in 1.6 — Plugin_Activator::maybe_unregister_daily_analysis_cron() clears any stale scheduled actions once per site (prc_tna_daily_analysis_cron_removed option). Scheduled runs are no longer automatic; trigger analysis manually or wire a new schedule.

Nexus system

This plugin does not register a WordPress Slack agent. Trending_News_System adds a trending-news system on prc_nexus_systems:

PieceValue
System idtrending-news
Slack-facing agentprc-nexus (owned by prc-slack)
Toolsagents/run-workflow, analyze-stories, inspect-run, list-recent-runs
Workflow grantprc-agents-trending-news/daily-analysis
Required capabilityedit_posts

Prompt text still lives on Trending_News_Analyst_Agent::build_system_prompt() (date grounding included). The constant AGENT_SLUG remains for older references; wp_register_agent is not called for it.

Bot identity: site option prc_wp_bot_user_id / login prc_wp_bot. Bot_Identity::can_run_abilities() allows manage_options or the bot user. Nexus chat permission filters live on prc-slack (Machine_Principal).

Custom post types

Post typeLabelMenu
trending_news_runTrending News Runsunder Settings
trending_news_wfTrending News Workflowshidden (show_in_menu: false)

Run meta: _tna_run_result. Workflow meta: _tna_workflow_spec. Caps require manage_options for create/edit/delete.

Headline source

Fetch uses constant PRC_PLATFORM_GOOGLE_NEWS_API_KEY. The settings field analysis.google_news_api_key is persisted but the UI notes it is unused by the runtime path today.

WP-CLI

wp prc agents-trending-news run [--category=] [--total=] [--from=] [--to=] [--query=] [--output_format=json|markdown]
wp prc agents-trending-news run --run-id=<id>
wp prc agents-trending-news run --step=<fetch|filter|categorize|enrich|rank|analyze> --from-run=<id>

Was this helpful?