Read docs/CONTEXT.md and follow it.
- Python src layout:
src/anomaly_detector - Minimal deps: numpy/pandas/scikit-learn/typer/rich/pydantic
- Add tests for core logic (pytest)
- Keep functions small, readable; add type hints where helpful
- Update README with runnable examples using
poetry run ...
Implement these modules and keep them simple:
data/synth.py: synthetic multivariate telemetry + labelled anomaly intervals (ground truth)detectors/rolling_zscore.py: baseline rolling z-score detector + conversion to predicted intervalsevaluation/event_metrics.py: event precision/recall/F1 for interval detectionstreaming/replay.py: sequential replay that emits alerts with context windowscli.py: Typer CLI commands:generate-datarun-streamevaluate
- No flight-control logic, no claims about certification/DO-178C compliance
- Avoid excessive dependencies and over-complicated architectures