Pipeline, storage, and Nexus system registration for @prc/agents-trending-news.
Workflow
Workflow ID: prc-agents-trending-news/daily-analysis
| Step | Ability |
|---|---|
fetch | prc-agents-trending-news/fetch-headlines |
filter | prc-agents-trending-news/filter-and-deduplicate |
categorize | prc-agents-trending-news/extract-categories |
enrich | prc-agents-trending-news/enrich-with-related-posts |
rank | prc-agents-trending-news/rank-by-importance |
analyze | prc-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:
| Piece | Value |
|---|---|
| System id | trending-news |
| Slack-facing agent | prc-nexus (owned by prc-slack) |
| Tools | agents/run-workflow, analyze-stories, inspect-run, list-recent-runs |
| Workflow grant | prc-agents-trending-news/daily-analysis |
| Required capability | edit_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 type | Label | Menu |
|---|---|---|
trending_news_run | Trending News Runs | under Settings |
trending_news_wf | Trending News Workflows | hidden (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>