Skip to content

Add RevenueAlertEscalationSkill - revenue anomaly detection with incident escalation - #286

Merged
lbartoszcze merged 3 commits into
mainfrom
wisent/revenue-alert-escalation
Feb 9, 2026
Merged

lbartoszcze merged 3 commits into
mainfrom
wisent/revenue-alert-escalation

Conversation

@lbartoszcze

Copy link
Copy Markdown
Contributor

Summary

  • RevenueAlertEscalationSkill - Revenue-specific anomaly detection and auto-incident escalation ([AGENT] Add CONTRIBUTING.md #1 priority from session 200 MEMORY: "Revenue Alert Escalation")
  • Bridges RevenueObservabilityBridgeSkill → IncidentResponseSkill for autonomous revenue monitoring
  • 5 default alert rules: revenue_drop (>30% baseline drop), zero_revenue (critical), low_success_rate (<80%), no_customers, revenue_spike (>200% increase)
  • 6 actions: check (evaluate metrics against rules), rules (CRUD for alert rules), status (active alerts), history (audit trail), configure (escalation behavior), health (revenue health dashboard with score and recommendations)
  • Rule engine: configurable conditions (below, equals, above, drop_percent, spike_percent) with severity levels and cooldown periods
  • Baseline calculation: moving average from last N snapshots for trend-based anomaly detection
  • Auto-escalation: creates incidents via IncidentResponseSkill when alerts fire, auto-resolves when metrics return to normal
  • Health dashboard: 0-100 health score with severity-weighted penalties, trend analysis, and actionable recommendations
  • Persistent JSON state: alert rules, active alerts, metric snapshots, incident links, operation stats
  • Registered in autonomous_agent.py DEFAULT_SKILL_CLASSES
  • 16 new tests, all passing. 17 smoke tests passing.

Pillar: Revenue (primary), Self-Improvement (supporting)

This closes the critical gap between revenue monitoring and incident response. Previously, revenue drops went unnoticed until manual inspection. Now the agent autonomously monitors its own revenue health, detects anomalies via configurable rules, auto-creates incidents for the response team, and provides a health dashboard with actionable recommendations. This is the "immune system" for the agent's revenue pipeline.

Test plan

  • 16 unit tests covering all 6 actions
  • Tests for: empty metrics, healthy metrics, zero revenue alerts, low success rate, alert resolution, rule CRUD, history filtering, configuration, health scoring
  • 17 smoke tests still passing

🤖 Generated with Claude Code

…-incident escalation (#1 priority from MEMORY)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lbartoszcze
lbartoszcze force-pushed the wisent/revenue-alert-escalation branch from 31d8d86 to 4136b4f Compare February 8, 2026 23:54
@lbartoszcze
lbartoszcze merged commit ad81735 into main Feb 9, 2026
0 of 4 checks passed
@lbartoszcze
lbartoszcze deleted the wisent/revenue-alert-escalation branch August 7, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant