Skip to content

Define core domain models and interfaces (AlgorithmPattern taxonomy, detector/classifier ABCs) #3

Description

@MaximilianRau04

Context

src/algorithm_pattern_classifier/{classifiers,detectors,interfaces,models}/ currently only contain empty __init__.py files. Before any detector/classifier can be implemented, we need the shared vocabulary the rest of the engine will build on.

What

Define the core domain models and abstract interfaces:

  • Models (models/): an AlgorithmPattern enum/taxonomy (e.g. two-pointer, sliding-window, dynamic programming, backtracking, BFS/DFS, greedy, divide-and-conquer, binary search), and a ClassificationResult (pattern, confidence score, supporting evidence/line references).
  • Interfaces (interfaces/): BaseDetector (inspects source/AST for evidence of one specific pattern) and BaseClassifier (aggregates detector outputs into ranked ClassificationResults).

This mirrors the interface/model split already established in the dsa-autopsy sibling project and should unblock #2 and #3.

Acceptance Criteria

  • AlgorithmPattern taxonomy documented with at least 6 initial pattern types
  • ClassificationResult model and BaseDetector/BaseClassifier ABCs added with documented abstract methods
  • Unit tests covering model construction/equality
  • mypy/ruff clean

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions