From 59148cc368d2a7c646e9fde4fda5065c4d355c4b Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Fri, 20 Mar 2026 15:01:06 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20Restructure=20specs=20=E2=80=94=20move?= =?UTF-8?q?=20method-decomposition=20to=20changes/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move method-decomposition (status: draft, refactoring task) from specs/ to changes/ with proper OpenSpec change structure. specs/ is now empty (no implemented specs documented yet). --- .../changes/method-decomposition/.openspec.yaml | 2 ++ openspec/changes/method-decomposition/design.md | 7 +++++++ openspec/changes/method-decomposition/proposal.md | 13 +++++++++++++ .../specs/method-decomposition/spec.md | 0 openspec/changes/method-decomposition/tasks.md | 11 +++++++++++ 5 files changed, 33 insertions(+) create mode 100644 openspec/changes/method-decomposition/.openspec.yaml create mode 100644 openspec/changes/method-decomposition/design.md create mode 100644 openspec/changes/method-decomposition/proposal.md rename openspec/{ => changes/method-decomposition}/specs/method-decomposition/spec.md (100%) create mode 100644 openspec/changes/method-decomposition/tasks.md diff --git a/openspec/changes/method-decomposition/.openspec.yaml b/openspec/changes/method-decomposition/.openspec.yaml new file mode 100644 index 0000000..eeb4152 --- /dev/null +++ b/openspec/changes/method-decomposition/.openspec.yaml @@ -0,0 +1,2 @@ +schema: conduction +created: 2026-03-20 diff --git a/openspec/changes/method-decomposition/design.md b/openspec/changes/method-decomposition/design.md new file mode 100644 index 0000000..fee2b62 --- /dev/null +++ b/openspec/changes/method-decomposition/design.md @@ -0,0 +1,7 @@ +# Design: method-decomposition + +## Architecture Overview + +See specs/method-decomposition/spec.md for detailed per-class decomposition plans. +The approach follows extract-method and extract-class refactoring patterns, with each +complex controller/service being broken into focused handler classes. diff --git a/openspec/changes/method-decomposition/proposal.md b/openspec/changes/method-decomposition/proposal.md new file mode 100644 index 0000000..ae3253a --- /dev/null +++ b/openspec/changes/method-decomposition/proposal.md @@ -0,0 +1,13 @@ +# Proposal: method-decomposition + +## Summary +Eliminate 145 PHPMD complexity suppressions by decomposing complex methods and classes into smaller, focused units. + +## Motivation +The SoftwareCatalog codebase has 326 @SuppressWarnings(PHPMD.*) annotations, of which 145 relate to structural complexity (CyclomaticComplexity, NPathComplexity, ExcessiveMethodLength, ExcessiveClassLength, ExcessiveClassComplexity, CouplingBetweenObjects, TooManyMethods). These indicate methods and classes that are too large and complex, making the code harder to maintain and test. + +## Scope +- Decompose SettingsController (23 suppressions) +- Decompose all controllers, services, and commands exceeding PHPMD thresholds +- Extract handler classes for sync, module registration, and configuration logic +- Maintain backward compatibility in all public API endpoints diff --git a/openspec/specs/method-decomposition/spec.md b/openspec/changes/method-decomposition/specs/method-decomposition/spec.md similarity index 100% rename from openspec/specs/method-decomposition/spec.md rename to openspec/changes/method-decomposition/specs/method-decomposition/spec.md diff --git a/openspec/changes/method-decomposition/tasks.md b/openspec/changes/method-decomposition/tasks.md new file mode 100644 index 0000000..948fd7f --- /dev/null +++ b/openspec/changes/method-decomposition/tasks.md @@ -0,0 +1,11 @@ +# Tasks: method-decomposition + +## Task 1: SettingsController decomposition +- **Spec ref**: specs/method-decomposition/spec.md#REQ-DECOMP-001 +- **Status**: todo +- **Acceptance criteria**: SettingsController reduced to thin action methods delegating to handler classes + +## Task 2: Remaining controller decompositions +- **Spec ref**: specs/method-decomposition/spec.md +- **Status**: todo +- **Acceptance criteria**: All controllers under PHPMD thresholds without suppressions