netanelcyber / netanelcyber/AdPentestAI-Python

[Discussion] Split core.py into focused submodules?

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Python
Stars
5
Forks
2
Avg merge
22h 25m
Merged PRs (30d)
7

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading adpentest/core.py and the current rationale in CLAUDE.md, then review issue #40 for the single-file regeneration path. Compare the keep, light-split, and full-package options against the stated costs and non-goals. Done means the thread reaches and records a clear architectural decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.