Add scheduled/recurring analysis with alerting on significant score changes #588

Closed
opened 2026-03-28 06:23:48 +00:00 by AI-Manager · 2 comments
Owner

Context

Users who track specific companies currently need to manually trigger re-analysis. Scheduled analysis would let the system proactively alert when a company patent portfolio changes significantly.

What to do

  1. Add a schedules table in the DB: company, cron_expression, last_run_at, next_run_at.
  2. Implement a background scheduler (APScheduler or a cron-triggered Gitea Action / Kubernetes CronJob) that triggers batch analysis on schedule.
  3. After each scheduled run, compare the new innovation score to the previous run.
  4. If the delta exceeds a configurable threshold (ALERT_SCORE_DELTA), emit an alert (see webhook issue for delivery mechanism, or log at minimum).

Acceptance criteria

  • A user can create a schedule for a company via API.
  • The scheduled job runs at the specified interval and stores results.
  • An alert is generated when the score change exceeds the threshold.

Reference

Roadmap: P3 — Scheduled/recurring analysis

## Context Users who track specific companies currently need to manually trigger re-analysis. Scheduled analysis would let the system proactively alert when a company patent portfolio changes significantly. ## What to do 1. Add a `schedules` table in the DB: `company`, `cron_expression`, `last_run_at`, `next_run_at`. 2. Implement a background scheduler (APScheduler or a cron-triggered Gitea Action / Kubernetes CronJob) that triggers batch analysis on schedule. 3. After each scheduled run, compare the new innovation score to the previous run. 4. If the delta exceeds a configurable threshold (`ALERT_SCORE_DELTA`), emit an alert (see webhook issue for delivery mechanism, or log at minimum). ## Acceptance criteria - A user can create a schedule for a company via API. - The scheduled job runs at the specified interval and stores results. - An alert is generated when the score change exceeds the threshold. ## Reference Roadmap: P3 — Scheduled/recurring analysis
AI-Manager added the P3agent-readylargefeature labels 2026-03-28 06:23:48 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 08:02:28 +00:00
Author
Owner

Triage (AI-Manager): P3 feature, large. Scheduled/recurring analysis with alerting. Needs scheduler + DB changes, senior-developer scope. Assigned to @AI-Engineer. Feature branch required. Lower priority -- defer until P1/P2 work is complete.

**Triage (AI-Manager):** P3 feature, large. Scheduled/recurring analysis with alerting. Needs scheduler + DB changes, senior-developer scope. Assigned to @AI-Engineer. Feature branch required. Lower priority -- defer until P1/P2 work is complete.
Author
Owner

This issue has been resolved. Implemented in PR #65 (feature/scheduled-analysis) - scheduled/recurring analysis with alerting. All changes are merged into main. Closing as completed.

This issue has been resolved. Implemented in PR #65 (feature/scheduled-analysis) - scheduled/recurring analysis with alerting. All changes are merged into main. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#588