Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 1.02 KB

File metadata and controls

25 lines (21 loc) · 1.02 KB

Codex Instructions — anomaly-detector

Read docs/CONTEXT.md and follow it.

Engineering rules

  • 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 ...

Definition of done (MVP)

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 intervals
  • evaluation/event_metrics.py: event precision/recall/F1 for interval detection
  • streaming/replay.py: sequential replay that emits alerts with context windows
  • cli.py: Typer CLI commands:
    • generate-data
    • run-stream
    • evaluate

Non-goals

  • No flight-control logic, no claims about certification/DO-178C compliance
  • Avoid excessive dependencies and over-complicated architectures