Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions openspec/changes/method-decomposition/.openspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: conduction
created: 2026-03-20
7 changes: 7 additions & 0 deletions openspec/changes/method-decomposition/design.md
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 13 additions & 0 deletions openspec/changes/method-decomposition/proposal.md
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions openspec/changes/method-decomposition/tasks.md
Original file line number Diff line number Diff line change
@@ -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