Automated Data Analysis Engine
Core Principles
- Anomalies are more noteworthy than normal states: Every anomaly is a signal for improvement; 24/7 uninterrupted detection ensures nothing is missed
- Attribution is more important than detection: Discovering anomalies is only the starting point; the four-step attribution method (authenticity → scope → correlation → conclusion) transforms anomalies into actions
- Tiered alerts rather than one-size-fits-all: P0 instant push + phone call, P1 within 2 hours, P2 daily summary, P3 log only; front-loading rules reduces noise
Interaction Mode
🤖 AI Auto-Execution (Data Analysis Type)
Input
| Input Item |
Type |
Required |
Source |
Description |
| Metric System |
JSON |
Yes |
output/pm-metrics-design/metrics-system/metric_system.json |
Core metric list and definitions to monitor |
| Real-time Data Stream |
JSON |
Yes |
Data Warehouse / Real-time Computing Platform |
Metric time-series data |
| Alert Rules |
JSON |
Yes |
User-provided |
Threshold configurations for various metric anomalies |
| Event Calendar |
JSON |
○ |
User-provided |
External events such as product changes, marketing campaigns, market events |
Execution Steps
Step 1: Hourly Core Metric Health Check [Core]
Executed hourly on schedule
├── Retrieve current values of all core metrics
├── Calculate YoY (same period last week) and MoM (previous hour) changes
├── Compare against preset thresholds and historical fluctuation ranges
└── Flag metrics requiring attention
Step 2: Anomaly Detection [Core]
| Detection Method |
Description |
| Statistical Threshold |
Set upper/lower limits based on historical data (e.g., ±3σ) |
| Trend Deviation |
Significant deviation from historical trend |
| Period-over-Period Anomaly |
Large fluctuation compared to recent data |
| Year-over-Year Anomaly |
Significant change compared to the same period last year |
Step 3: Automatic Attribution [Core]
Four-step automatic anomaly attribution method:
1. Confirm Authenticity
├── Exclude data latency issues
├── Exclude data pipeline failures
├── Exclude statistical noise (natural fluctuation)
└── Confirm as real anomaly
2. Locate Scope
├── How many users are affected
├── Which features/pages are affected
├── Which platforms/channels are affected
└── How long has it lasted
3. Correlate External Events
├── Product changes (version releases, feature toggles)
├── Marketing campaigns (promotions, push notifications, pop-ups)
├── Market events (competitor actions, trending events)
└── Environmental factors (holidays, weather, emergencies)
4. Generate Attribution Conclusion
├── Most likely cause (most_likely_cause)
├── Confidence level (confidence)
├── Supporting evidence (evidence)
└── Recommended action (recommended_action)
Step 4: Insight Push [Core]
Push based on anomaly severity:
- P0 (Critical): Instant push + phone alert
- P1 (Important): Notification within 2 hours
- P2 (Moderate): Daily summary
- P3 (Info): Log only
Output Depth Levels
| Depth Level |
Output Scope |
Description |
| quick |
Anomaly diagnosis and root cause |
Core conclusions + minimum viable output |
| standard |
Complete output (current default) |
Complete output including all Step outputs |
| deep |
Complete analysis + root cause reasoning chain + impact scope assessment + prevention mechanism design |
Complete output + extended analysis + deep reasoning |
Output
Output File Path: output/pm-metrics-ops/analysis-anomaly/
Output Schema:
{
"type": "object",
"required": ["metric_name", "current_value", "severity", "attribution"],
"properties": {
"metric_name": {"type": "string", "description": "Anomalous metric name"},
"current_value": {"type": "number", "description": "Current value"},
"expected_range": {"type": "array", "description": "Expected range"},
"deviation": {"type": "string", "description": "Degree of deviation"},
"severity": {"type": "string", "description": "Severity level: P0/P1/P2/P3"},
"attribution": {"type": "object", "description": "Attribution information, including authenticity judgment, related events, and recommended actions"},
"trend_chart_url": {"type": "string", "description": "Trend chart URL"},
"raw_data_url": {"type": "string", "description": "Raw data URL"}
}
}
anomaly_report:
timestamp: "2024-01-15T10:30:00Z"
# Basic information
metric_name: "dau_conversion_rate"
current_value: 12.3
expected_range: [15.0, 20.0]
deviation: -27%
# Severity level
severity: "P1" # P0/P1/P2/P3
# Attribution information
attribution:
is_real: true
scope:
affected_users: 150000
affected_platforms: ["iOS", "Android"]
affected_features: ["Home Recommendations"]
duration: "ongoing"
related_events:
- type: "product_release"
name: "v2.5.0 Release"
time: "2024-01-15T08:00:00Z"
confidence: 0.85
- type: "marketing_campaign"
name: "New Year Promotion"
time: "2024-01-14T00:00:00Z"
confidence: 0.3
most_likely_cause: |
The home recommendation algorithm change in v2.5.0
caused a decrease in recommendation content relevance to user interests
confidence: 0.85
evidence:
- "Anomaly occurred within 2 hours of version release"
- "Both iOS and Android declined simultaneously, excluding client-side issues"
- "Non-campaign period, excluding marketing impact"
recommended_action: |
1. Immediately check v2.5.0 home recommendation algorithm changes
2. If root cause cannot be located within 2 hours, prepare rollback
3. Prepare A/B test to verify hypothesis
needs_human_confirmation: true
# Auxiliary information
trend_chart_url: "output/pm-metrics-ops/analysis-anomaly/charts/dau_conversion_20240115.png"
raw_data_url: "output/pm-metrics-ops/analysis-anomaly/data/dau_conversion_20240115.json"
Storage Path
output/pm-metrics-ops/analysis-anomaly/
├── anomaly_reports/
│ ├── YYYYMMDD_HHMMSS_anomaly_{metric}.yaml
│ └── summary_{date}.yaml
├── charts/
│ └── {metric}_{date}.png
└── data/
└── {metric}_{date}.json
Configuration Example
# Metric anomaly detection configuration
anomaly_detection:
core_metrics:
- name: "dau"
threshold_type: "absolute"
min_value: 1000000
max_value: null
alert_on: "below"
- name: "dau_conversion_rate"
threshold_type: "statistical"
std_multiplier: 3
min_change_pct: 5
alert_on: "both"
- name: "revenue_daily"
threshold_type: "relative"
vs_last_week_pct: -15
alert_on: "below"
notification:
channels:
- type: "slack"
url: "${SLACK_WEBHOOK}"
- type: "phone"
for_severity: ["P0"]
Output Validation Rules
| Field Path |
Type |
Required |
Description |
| anomaly_report |
object |
Yes |
Anomaly report root object |
| anomaly_report.metric_name |
string |
Yes |
Anomalous metric name |
| anomaly_report.current_value |
number |
Yes |
Current value |
| anomaly_report.expected_range |
array |
Yes |
Expected range, [min, max] |
| anomaly_report.deviation |
string |
Yes |
Degree of deviation |
| anomaly_report.severity |
string |
Yes |
Severity level, enum: P0/P1/P2/P3 |
| anomaly_report.attribution |
object |
Yes |
Attribution information |
| anomaly_report.attribution.is_real |
boolean |
Yes |
Whether it is a real anomaly |
| anomaly_report.attribution.scope |
object |
Yes |
Impact scope |
| anomaly_report.attribution.most_likely_cause |
string |
Yes |
Most likely cause |
| anomaly_report.attribution.confidence |
number |
Yes |
Confidence level, 0-1 |
| anomaly_report.attribution.recommended_action |
string |
Yes |
Recommended action |
| anomaly_report.attribution.needs_human_confirmation |
boolean |
Yes |
Whether human confirmation is needed |
| anomaly_report.trend_chart_url |
string |
No |
Trend chart URL |
| anomaly_report.raw_data_url |
string |
No |
Raw data URL |
Upstream Change Response
When upstream inputs change, this Skill's response strategy:
| Upstream Change |
Impact Scope |
Response Strategy |
| Metric system change |
Monitored metric list and thresholds |
Update monitored metric list, reload alert rules, flag for human confirmation |
| Alert rule change |
Anomaly detection thresholds and push strategy |
Reload alert rules, update detection parameters |
| Event calendar change |
External events for attribution correlation |
Update event correlation data, re-evaluate attribution of unconfirmed anomalies |
| Data source change |
Data retrieval and calculation logic |
Update data source configuration, verify data completeness |
When anomaly reports themselves change, notification mechanism for downstream:
| Report Change Type |
Notification Scope |
Notification Method |
| P0/P1 anomaly added |
decision-dace, data-analysis-report |
Flag anomaly addition, trigger insight conversion |
| Attribution conclusion changed |
decision-dace |
Flag attribution change, trigger DACE Conclude |
| Severity level escalated |
All downstream |
Flag level escalation, trigger corresponding alert strategy |
Decision Rules
| Condition |
Action |
| P0 anomaly (core metric ↓ > 10%) |
Instant push + phone alert + auto-create Incident |
| P1 anomaly (metric ↓ 3-10%) |
Push within 2 hours + Slack notification |
| P2 anomaly (metric ↓ 1-3%) |
Daily summary |
| P3 fluctuation (metric ↓ < 1%) |
Log, continue monitoring |
| Human confirmation needed |
Send confirmation request, await response |
Quality Checks
P0 Checks (must pass for quick/standard/deep)
P1 Checks (must pass for standard/deep)
P2 Checks (must pass for deep only)
Degradation Strategy
Upstream File Missing Degradation Plan
| Missing Scope |
Degradation Plan |
Output Impact |
| Metric system missing |
Prompt user to provide metric data and anomaly description, perform attribution analysis based on description |
Anomaly detection scope based on user description, may miss unmonitored metrics |
| Real-time data stream missing |
User provides metric data and anomaly description → attribution analysis based on description |
Cannot automatically detect anomalies, relies on user to proactively discover |
| Both metric system and real-time data stream missing |
User provides metric data and anomaly description → attribution analysis based on description |
Output attribution analysis report based on description, marked as "pending verification" |
- If user does not provide alert rules, prompt user to provide or skip steps related to this input
- If user does not provide event calendar, prompt user to provide or skip steps related to this input
Data Acquisition Instructions
When upstream files are missing, the user needs to provide the following information to support degraded generation:
- Metric Data: Name, current value, baseline value, and change magnitude of the anomalous metric
- Anomaly Description: Observed anomaly phenomena and time of occurrence
- Recent Changes (optional): Potentially related product changes or marketing campaigns
Execution Frequency
- Normal operation: Execute once per hour
- During P0 anomaly: Update status every 15 minutes
- Routine report: Generate daily report at 8:00
1---2name: analysis-anomaly3description: "Use when automatic detection and attribution of metric anomalies are needed. Automated data analysis engine, AI automatically runs 24/7, responsible for metric health checks, anomaly detection, automatic attribution, and insight push. Outputs a complete anomaly report when metric anomalies are detected. Keywords: anomaly detection, data analysis, automatic attribution, metric monitoring, anomaly report, metric anomaly, data anomaly, anomaly alert, data has issues, metric suddenly dropped, data fluctuation."4metadata:5 source: https://skillmd.com/skills/luckyonetwothree/analysis-anomaly6 module: "Product Metrics Operations"7 sub-module: "Data Analysis"8 type: "pipeline"9 version: "2.1"10 domain_tags: ["Internet", "SaaS", "General"]11 trigger_examples:12 - "DAU suddenly dropped 30% today, help me find the cause"13 - "Metric anomaly alert, help me with attribution analysis"14 - "Data fluctuation is too large, see what went wrong"15 interaction_mode: "ai_auto"16execution_depth:17 default: standard18 quick_description: "Directly output anomaly diagnosis and root cause"19 deep_description: "Complete analysis + root cause reasoning chain + impact scope assessment + prevention mechanism design"20---2122# Automated Data Analysis Engine2324## Core Principles25261. **Anomalies are more noteworthy than normal states**: Every anomaly is a signal for improvement; 24/7 uninterrupted detection ensures nothing is missed272. **Attribution is more important than detection**: Discovering anomalies is only the starting point; the four-step attribution method (authenticity → scope → correlation → conclusion) transforms anomalies into actions283. **Tiered alerts rather than one-size-fits-all**: P0 instant push + phone call, P1 within 2 hours, P2 daily summary, P3 log only; front-loading rules reduces noise2930## Interaction Mode3132🤖 AI Auto-Execution (Data Analysis Type)3334## Input3536| Input Item | Type | Required | Source | Description |37|--------|------|------|------|------|38| Metric System | JSON | Yes | output/pm-metrics-design/metrics-system/metric_system.json | Core metric list and definitions to monitor |39| Real-time Data Stream | JSON | Yes | Data Warehouse / Real-time Computing Platform | Metric time-series data |40| Alert Rules | JSON | Yes | User-provided | Threshold configurations for various metric anomalies |41| Event Calendar | JSON | ○ | User-provided | External events such as product changes, marketing campaigns, market events |4243## Execution Steps4445### Step 1: Hourly Core Metric Health Check [Core]4647```48Executed hourly on schedule49├── Retrieve current values of all core metrics50├── Calculate YoY (same period last week) and MoM (previous hour) changes51├── Compare against preset thresholds and historical fluctuation ranges52└── Flag metrics requiring attention53```5455### Step 2: Anomaly Detection [Core]5657| Detection Method | Description |58|---------|------|59| Statistical Threshold | Set upper/lower limits based on historical data (e.g., ±3σ) |60| Trend Deviation | Significant deviation from historical trend |61| Period-over-Period Anomaly | Large fluctuation compared to recent data |62| Year-over-Year Anomaly | Significant change compared to the same period last year |6364### Step 3: Automatic Attribution [Core]6566Four-step automatic anomaly attribution method:6768```691. Confirm Authenticity70 ├── Exclude data latency issues71 ├── Exclude data pipeline failures72 ├── Exclude statistical noise (natural fluctuation)73 └── Confirm as real anomaly74752. Locate Scope76 ├── How many users are affected77 ├── Which features/pages are affected78 ├── Which platforms/channels are affected79 └── How long has it lasted80813. Correlate External Events82 ├── Product changes (version releases, feature toggles)83 ├── Marketing campaigns (promotions, push notifications, pop-ups)84 ├── Market events (competitor actions, trending events)85 └── Environmental factors (holidays, weather, emergencies)86874. Generate Attribution Conclusion88 ├── Most likely cause (most_likely_cause)89 ├── Confidence level (confidence)90 ├── Supporting evidence (evidence)91 └── Recommended action (recommended_action)92```9394### Step 4: Insight Push [Core]9596Push based on anomaly severity:9798- **P0 (Critical)**: Instant push + phone alert99- **P1 (Important)**: Notification within 2 hours100- **P2 (Moderate)**: Daily summary101- **P3 (Info)**: Log only102103### Output Depth Levels104105| Depth Level | Output Scope | Description |106|----------|----------|------|107| quick | Anomaly diagnosis and root cause | Core conclusions + minimum viable output |108| standard | Complete output (current default) | Complete output including all Step outputs |109| deep | Complete analysis + root cause reasoning chain + impact scope assessment + prevention mechanism design | Complete output + extended analysis + deep reasoning |110111## Output112113114**Output File Path**: `output/pm-metrics-ops/analysis-anomaly/`115**Output Schema**:116117```json118{119 "type": "object",120 "required": ["metric_name", "current_value", "severity", "attribution"],121 "properties": {122 "metric_name": {"type": "string", "description": "Anomalous metric name"},123 "current_value": {"type": "number", "description": "Current value"},124 "expected_range": {"type": "array", "description": "Expected range"},125 "deviation": {"type": "string", "description": "Degree of deviation"},126 "severity": {"type": "string", "description": "Severity level: P0/P1/P2/P3"},127 "attribution": {"type": "object", "description": "Attribution information, including authenticity judgment, related events, and recommended actions"},128 "trend_chart_url": {"type": "string", "description": "Trend chart URL"},129 "raw_data_url": {"type": "string", "description": "Raw data URL"}130 }131}132```133134```yaml135anomaly_report:136 timestamp: "2024-01-15T10:30:00Z"137138 # Basic information139 metric_name: "dau_conversion_rate"140 current_value: 12.3141 expected_range: [15.0, 20.0]142 deviation: -27%143144 # Severity level145 severity: "P1" # P0/P1/P2/P3146147 # Attribution information148 attribution:149 is_real: true150 scope:151 affected_users: 150000152 affected_platforms: ["iOS", "Android"]153 affected_features: ["Home Recommendations"]154 duration: "ongoing"155156 related_events:157 - type: "product_release"158 name: "v2.5.0 Release"159 time: "2024-01-15T08:00:00Z"160 confidence: 0.85161 - type: "marketing_campaign"162 name: "New Year Promotion"163 time: "2024-01-14T00:00:00Z"164 confidence: 0.3165166 most_likely_cause: |167 The home recommendation algorithm change in v2.5.0168 caused a decrease in recommendation content relevance to user interests169170 confidence: 0.85171172 evidence:173 - "Anomaly occurred within 2 hours of version release"174 - "Both iOS and Android declined simultaneously, excluding client-side issues"175 - "Non-campaign period, excluding marketing impact"176177 recommended_action: |178 1. Immediately check v2.5.0 home recommendation algorithm changes179 2. If root cause cannot be located within 2 hours, prepare rollback180 3. Prepare A/B test to verify hypothesis181182 needs_human_confirmation: true183184 # Auxiliary information185 trend_chart_url: "output/pm-metrics-ops/analysis-anomaly/charts/dau_conversion_20240115.png"186 raw_data_url: "output/pm-metrics-ops/analysis-anomaly/data/dau_conversion_20240115.json"187```188189### Storage Path190191```192output/pm-metrics-ops/analysis-anomaly/193├── anomaly_reports/194│ ├── YYYYMMDD_HHMMSS_anomaly_{metric}.yaml195│ └── summary_{date}.yaml196├── charts/197│ └── {metric}_{date}.png198└── data/199 └── {metric}_{date}.json200```201202### Configuration Example203204```yaml205# Metric anomaly detection configuration206anomaly_detection:207 core_metrics:208 - name: "dau"209 threshold_type: "absolute"210 min_value: 1000000211 max_value: null212 alert_on: "below"213214 - name: "dau_conversion_rate"215 threshold_type: "statistical"216 std_multiplier: 3217 min_change_pct: 5218 alert_on: "both"219220 - name: "revenue_daily"221 threshold_type: "relative"222 vs_last_week_pct: -15223 alert_on: "below"224225 notification:226 channels:227 - type: "slack"228 url: "${SLACK_WEBHOOK}"229 - type: "phone"230 for_severity: ["P0"]231```232233## Output Validation Rules234235| Field Path | Type | Required | Description |236|----------|------|------|------|237| anomaly_report | object | Yes | Anomaly report root object |238| anomaly_report.metric_name | string | Yes | Anomalous metric name |239| anomaly_report.current_value | number | Yes | Current value |240| anomaly_report.expected_range | array | Yes | Expected range, [min, max] |241| anomaly_report.deviation | string | Yes | Degree of deviation |242| anomaly_report.severity | string | Yes | Severity level, enum: P0/P1/P2/P3 |243| anomaly_report.attribution | object | Yes | Attribution information |244| anomaly_report.attribution.is_real | boolean | Yes | Whether it is a real anomaly |245| anomaly_report.attribution.scope | object | Yes | Impact scope |246| anomaly_report.attribution.most_likely_cause | string | Yes | Most likely cause |247| anomaly_report.attribution.confidence | number | Yes | Confidence level, 0-1 |248| anomaly_report.attribution.recommended_action | string | Yes | Recommended action |249| anomaly_report.attribution.needs_human_confirmation | boolean | Yes | Whether human confirmation is needed |250| anomaly_report.trend_chart_url | string | No | Trend chart URL |251| anomaly_report.raw_data_url | string | No | Raw data URL |252253## Upstream Change Response254255When upstream inputs change, this Skill's response strategy:256257| Upstream Change | Impact Scope | Response Strategy |258|----------|----------|----------|259| Metric system change | Monitored metric list and thresholds | Update monitored metric list, reload alert rules, flag for human confirmation |260| Alert rule change | Anomaly detection thresholds and push strategy | Reload alert rules, update detection parameters |261| Event calendar change | External events for attribution correlation | Update event correlation data, re-evaluate attribution of unconfirmed anomalies |262| Data source change | Data retrieval and calculation logic | Update data source configuration, verify data completeness |263264When anomaly reports themselves change, notification mechanism for downstream:265266| Report Change Type | Notification Scope | Notification Method |267|-------------|----------|----------|268| P0/P1 anomaly added | decision-dace, data-analysis-report | Flag anomaly addition, trigger insight conversion |269| Attribution conclusion changed | decision-dace | Flag attribution change, trigger DACE Conclude |270| Severity level escalated | All downstream | Flag level escalation, trigger corresponding alert strategy |271272---273274## Decision Rules275276| Condition | Action |277|-----|--------|278| P0 anomaly (core metric ↓ > 10%) | Instant push + phone alert + auto-create Incident |279| P1 anomaly (metric ↓ 3-10%) | Push within 2 hours + Slack notification |280| P2 anomaly (metric ↓ 1-3%) | Daily summary |281| P3 fluctuation (metric ↓ < 1%) | Log, continue monitoring |282| Human confirmation needed | Send confirmation request, await response |283284## Quality Checks285286### P0 Checks (must pass for quick/standard/deep)287288- [ ] Anomaly detection covers all key metrics289- [ ] Anomaly severity classification is correct (P0/P1/P2)290291### P1 Checks (must pass for standard/deep)292293- [ ] Root cause analysis is supported by data294- [ ] Recommended actions are actionable295296### P2 Checks (must pass for deep only)297298- [ ] Extended analysis is complete (deep reasoning and roadmap generated)299- [ ] Decision records are complete (key decisions have rationale and alternatives)300301## Degradation Strategy302303### Upstream File Missing Degradation Plan304305| Missing Scope | Degradation Plan | Output Impact |306|----------|----------|----------|307| Metric system missing | Prompt user to provide metric data and anomaly description, perform attribution analysis based on description | Anomaly detection scope based on user description, may miss unmonitored metrics |308| Real-time data stream missing | User provides metric data and anomaly description → attribution analysis based on description | Cannot automatically detect anomalies, relies on user to proactively discover |309| Both metric system and real-time data stream missing | User provides metric data and anomaly description → attribution analysis based on description | Output attribution analysis report based on description, marked as "pending verification" |310311- If user does not provide alert rules, prompt user to provide or skip steps related to this input312- If user does not provide event calendar, prompt user to provide or skip steps related to this input313314### Data Acquisition Instructions315316When upstream files are missing, the user needs to provide the following information to support degraded generation:317- **Metric Data**: Name, current value, baseline value, and change magnitude of the anomalous metric318- **Anomaly Description**: Observed anomaly phenomena and time of occurrence319- **Recent Changes** (optional): Potentially related product changes or marketing campaigns320321### Execution Frequency322323- **Normal operation**: Execute once per hour324- **During P0 anomaly**: Update status every 15 minutes325- **Routine report**: Generate daily report at 8:00