Files
Aegis/tasks/todo.md
2026-02-19 19:15:31 +01:00

2.0 KiB

Aegis — Architectural Refactoring Task Tracker

Tier 1 — Quick Wins

  • QW-1: Wire existing repos into techniques.py router
  • [~] QW-2: Fix audit_service to follow UoW — deferred, resolves naturally as routers adopt UoW
  • QW-3: Consolidate status_service with TechniqueEntity.recalculate_status()
  • QW-4: Remove remaining HTTPException from services — already resolved

Tier 2 — Service Extraction (fat routers → thin routers + services)

  • SE-1: Extract reports service → coverage_report_service.py
  • SE-2: Extract metrics service → metrics_query_service.py
  • SE-3: Extract compliance service → compliance_service.py
  • SE-4: Extract detection_rules service → detection_rule_service.py
  • SE-5: Extract threat_actors service → threat_actor_service.py

Tier 3 — Architectural Fixes

  • AF-1: Persist scoring weights in DB → scoring_config table + scoring_config_service.py
  • AF-2: Slim tests.py router → test_crud_service.py
  • AF-3: Slim evidence.py router → evidence_service.py
  • AF-4: Slim campaigns.py router → campaign_crud_service.py

Tier 4 — Polish

  • P-1: Structured JSON logging → logging_config.py
  • P-2: Create architecture skill file → ~/.cursor/skills/aegis-architecture/SKILL.md

Completed (prior sessions)

  • Domain exceptions hierarchy (domain/errors.py)
  • TestEntity with state machine (domain/test_entity.py)
  • TechniqueEntity (domain/entities/technique.py)
  • Value objects: MitreId, ScoringWeights
  • Unit of Work (domain/unit_of_work.py)
  • Error handler middleware (middleware/error_handler.py)
  • Redis-backed token blacklist (auth.py)
  • CI pipeline (.github/workflows/ci.yml)
  • Heatmap service extracted (services/heatmap_service.py)
  • Scoring bulk queries (bulk_technique_scores)
  • Repository ports + implementations (Technique, Test)
  • Agent validation script (scripts/agent_validate_backend.sh)