complexity-management

Refactor PHP complexity hotspots to meet PHPInsights thresholds.

5|Updated May 30, 2023
One-click install
npx skills add https://github.com/VilnaCRM-Org/core-service --skill complexity-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: complexity-management
Source: https://github.com/VilnaCRM-Org/core-service/tree/main/.claude/skills/complexity-management
Command: npx skills add https://github.com/VilnaCRM-Org/core-service --skill complexity-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintain and improve code quality by preventing PHPInsights threshold breaches and guiding targeted refactoring instead of weakening rules.

Core Features & Use Cases

  • Identifies top complexity hotspots and provides practical refactoring patterns aligned with hexagonal architecture, DDD and CQRS.
  • Enforces non-negotiable thresholds (93% for src/, 95% for tests/, and 100% for code quality, architecture and style) and directs teams to fix issues rather than lowering config.
  • Supports a repeatable workflow: analyze, refactor one hotspot at a time, verify with PHPInsights, and monitor progress over time.

Quick Start

Run a complexity scan, pick the top hotspot, apply a single refactoring pattern, and re-run the full PHPInsights suite.

Frequently Asked Questions about complexity-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce code complexity to meet PHPInsights thresholds in Symfony microservices?

You reduce code complexity for PHPInsights by identifying top hotspots and applying targeted refactoring patterns aligned with hexagonal architecture, DDD, and CQRS, then verifying with the full suite.

What is the best way to enforce strict PHPInsights thresholds without lowering config standards?

Enforce strict PHPInsights thresholds by requiring code fixes instead of config changes, maintaining non-negotiable scores: 93% for src, 95% for tests, and 100% for quality, architecture, and style.

How do I refactor code complexity hotspots while preserving DDD and hexagonal architectural boundaries?

Refactor complexity hotspots while preserving DDD and hexagonal boundaries by applying targeted refactoring patterns specifically aligned with these architectures, ensuring structural integrity is maintained.

Does this complexity management approach work for non-Symfony PHP projects?

This complexity management approach specifically targets Symfony-based microservices using hexagonal architecture, DDD, and CQRS to identify hotspots and apply targeted refactoring to meet PHPInsights thresholds.

Why does PHPInsights threshold breaches happen and how can I prevent them?

PHPInsights threshold breaches happen as complexity increases; prevent them by applying a repeatable workflow: analyze, refactor one hotspot at a time, verify with PHPInsights, and monitor progress.