Pulse/internal/ai/context
rcourtman f3e95c24ae feat(ai): Add baseline learning and anomaly detection (Phase 2)
Phase 2 of Pulse AI differentiation:

- Create internal/ai/baseline package for learned baselines
- Implement statistical baseline learning with mean, stddev, percentiles
- Add z-score based anomaly detection with severity classification
  (low, medium, high, critical based on standard deviations)
- Integrate baseline provider into context builder
- Wire baseline store into patrol service with adapters
- Add anomaly enrichment to resource contexts

Key features:
- Learn computes baseline from historical metric data points
- IsAnomaly and CheckAnomaly detect deviations from normal
- Persists baselines to disk as JSON for durability
- Formatted anomaly descriptions for AI consumption
  Example: 'Memory is high above normal (85.2% vs typical 42.1% ± 8.3%)'

The baseline store needs to be initialized and triggered to learn
from metrics history. Next step is adding the learning loop.

All tests passing.
2025-12-12 11:26:31 +00:00
..
builder.go feat(ai): Add baseline learning and anomaly detection (Phase 2) 2025-12-12 11:26:31 +00:00
formatter.go feat(ai): Add baseline learning and anomaly detection (Phase 2) 2025-12-12 11:26:31 +00:00
trends.go feat(ai): Add enriched context with historical trends and predictions 2025-12-12 09:45:57 +00:00
trends_test.go feat(ai): Add enriched context with historical trends and predictions 2025-12-12 09:45:57 +00:00
types.go feat(ai): Add enriched context with historical trends and predictions 2025-12-12 09:45:57 +00:00