Skip to content

docs: add CLAUDE.md with module reorganization playbook #14705

Merged
rossops merged 2 commits intoDefectDojo:bugfixfrom
Maffooch:chore/module-reorganization-playbook
Apr 20, 2026
Merged

docs: add CLAUDE.md with module reorganization playbook #14705
rossops merged 2 commits intoDefectDojo:bugfixfrom
Maffooch:chore/module-reorganization-playbook

Conversation

@Maffooch
Copy link
Copy Markdown
Contributor

Summary

Adds a CLAUDE.md file documenting a repeatable playbook for reorganizing domain modules to match the structure established by dojo/url/. This serves as both developer documentation and AI-assistant guidance for ongoing modularization work.

Motivation

Several core modules (finding, test, engagement, product, product_type) are partially reorganized — UI views, queries, and signals have been extracted to subdirectories, but models (~5k lines), forms (~4k lines), filters (~4k lines), serializers (~3.4k lines), and API viewsets (~3.5k lines) remain in monolithic files. This document codifies the dojo/url/ pattern as the target architecture provides a step-by-step extraction process so contributors can work on modules independently and consistently.

What's included

  • Target directory structure matching dojo/url/ with ui/, api/, and shared business logic separation
  • 10-phase extraction playbook: models → services → forms → UI filters → UI views/urls → API serializers → API filters → viewsets → API urls
  • Service-layer guidance: principles for extracting business logic from views into services.py so both UI and API layers share single implementation
  • Per-module audit: specific classes, line ranges, and dependency notes for all 5 target modules
  • Cross-module dependency strategy: extraction order and lazy-import patterns to avoid circular imports
  • Safeguards: backward-compatible re-exports, admin double-registration prevention, migration verification

Maffooch and others added 2 commits April 16, 2026 22:30
Documents a repeatable 10-phase process for reorganizing domain modules
(finding, test, engagement, product, product_type) to match the dojo/url/
reference pattern. Includes service-layer extraction guidance to support
the long-term goal of removing the classic UI and going fully API-based.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Maffooch Maffooch requested a review from mtesauro as a code owner April 17, 2026 04:35
@Maffooch Maffooch added this to the 2.57.2 milestone Apr 17, 2026
Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@rossops rossops merged commit 9e935c4 into DefectDojo:bugfix Apr 20, 2026
156 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants