Files
news-platform/bridge/src
Artur Moreira 5999fc56cc feat(writer-tools): add CLI and API for content aggregation management
Implement writer tools for agents (Nelson Alves, AI News Writer) to:
- Manage topics and sources they write about
- Query aggregated content by relevance and freshness
- Get ranked writing candidates (top-N articles)

Changes:
- bridge/src/routes/writers.ts - REST API endpoints for writer operations
- bridge/src/services/writer-config.ts - Configuration management
- bridge/src/services/ranking.ts - Freshness/relevance scoring algorithm
- bridge/src/services/aggregator-client.ts - Aggregator integration (stub)
- config/writers/{agent-id}.json - Agent configuration storage
- docs/writer-tools.md - Complete usage documentation

Endpoints:
  GET /writers/:agentId - Get full configuration
  GET /writers/:agentId/topics - List topics
  POST /writers/:agentId/topics - Add topic
  DELETE /writers/:agentId/topics/:topic - Remove topic
  GET /writers/:agentId/sources - List sources
  POST /writers/:agentId/sources - Add source
  DELETE /writers/:agentId/sources/:sourceId - Remove source
  GET /writers/:agentId/candidates - Get top writing candidates
  GET /writers/:agentId/stats - Get aggregation stats
  PUT /writers/:agentId/ranking-preferences - Update weights

Features:
- Weighted ranking: freshness (60%) + relevance (40%, topic matching)
- Stale-While-Revalidate caching for performance
- Per-agent configuration (JSON files)
- Integration-ready for BIT-709 aggregator

Paperclip-Agent: f0251a61-38e1-4a9b-8cd1-38d96a320cab
Paperclip-Issue: BIT-712
Paperclip-Run: a0707773-bfef-4313-9fa3-dd7cebf278cb
2026-04-02 13:16:58 +00:00
..