Skip to content

[Discussion] Split core.py into focused submodules? #43

Description

@netanelcyber

Question

adpentest/core.py is now ~11,200 lines. Should we split it into submodules, or is single-file the intentional design?

Current single-file rationale (per CLAUDE.md)

  • No circular imports
  • Centralized tool registry, error handling, profiler
  • One file to modify for tool changes
  • Easy grep/read for LLM tools

Cost as of today

  • Slow IDE navigation, jump-to-def latency
  • Merge conflicts concentrate on one file
  • Cognitive load for new contributors
  • Hard to unit-test in isolation

Options to weigh

  1. Keep single-file — status quo, invest in section banners + # region markers instead
  2. Light split — extract long-standing self-contained blocks (email protocols, SPN enum, DC detection) into 3-4 submodules, keep core.py as the coordinator
  3. Full package splitdc/, enum/, email/, kerberos/, tools/, parallel/ — matches the CLAUDE.md architecture headings

Note: the adpentest_onefile.py single-file distribution can be regenerated automatically (see #40), so a package split does not lose the single-file consumption path.

Non-goals

  • Behaviour change
  • Public API rename

Cast opinions in the thread.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions