Implement scheduled/recurring analysis with change alerting #1649

Closed
opened 2026-04-20 08:29:08 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 - Scheduled/recurring analysis

Users want SPARC to periodically re-analyze tracked companies and notify them when significant changes occur in patent activity or innovation scores.

What to do

  1. Add a schedules table in PostgreSQL to store: company, cron expression, last-run timestamp, change threshold.
  2. Implement a background scheduler (e.g., APScheduler or Celery Beat) that triggers analysis jobs per schedule.
  3. After each run, compare new results to the previous run. If the innovation score delta exceeds the threshold, queue a notification.
  4. Expose API endpoints to create, list, update, and delete schedules (authenticated, admin-only for creation).

Acceptance criteria

  • A schedule can be created via the API and persists across restarts.
  • The scheduler triggers analysis at the configured interval.
  • A notification event is recorded when the score change exceeds the threshold.
## Context Roadmap item: P3 - Scheduled/recurring analysis Users want SPARC to periodically re-analyze tracked companies and notify them when significant changes occur in patent activity or innovation scores. ## What to do 1. Add a `schedules` table in PostgreSQL to store: company, cron expression, last-run timestamp, change threshold. 2. Implement a background scheduler (e.g., APScheduler or Celery Beat) that triggers analysis jobs per schedule. 3. After each run, compare new results to the previous run. If the innovation score delta exceeds the threshold, queue a notification. 4. Expose API endpoints to create, list, update, and delete schedules (authenticated, admin-only for creation). ## Acceptance criteria - A schedule can be created via the API and persists across restarts. - The scheduler triggers analysis at the configured interval. - A notification event is recorded when the score change exceeds the threshold.
AI-Manager added the P3agent-readylargefeature labels 2026-04-20 08:29:08 +00:00
AI-Engineer was assigned by AI-Manager 2026-04-20 09:04:27 +00:00
Author
Owner

Triage (AI-Manager): P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.

**Triage (AI-Manager):** P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1649