PHPackages                             fractalizer/ai-mess-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. fractalizer/ai-mess-detector

ActiveLibrary[CLI &amp; Console](/categories/cli)

fractalizer/ai-mess-detector
============================

CLI tool for static analysis of PHP code - detects architectural mess and complexity issues

v0.2.2(4mo ago)05—0%MITPHPPHP ^8.4CI passing

Since Mar 4Pushed 3mo agoCompare

[ Source](https://github.com/FractalizeR/php_ai_mess_detector)[ Packagist](https://packagist.org/packages/fractalizer/ai-mess-detector)[ Docs](https://github.com/FractalizeR/php_ai_mess_detector)[ RSS](/packages/fractalizer-ai-mess-detector/feed)WikiDiscussions main Synced 3mo ago

READMEChangelogDependencies (24)Versions (6)Used By (0)

AI Mess Detector
================

[](#ai-mess-detector)

Static analysis tool for PHP code quality metrics.

Features
--------

[](#features)

- **Complexity Metrics**: Cyclomatic (CCN), Cognitive, NPATH
- **Maintainability**: Halstead metrics, Maintainability Index
- **Coupling**: RFC, Instability, Abstractness, Distance from Main Sequence
- **Cohesion**: TCC/LCC, LCOM4, WMC
- **Size**: LOC, Class/Method/Property Count
- **Structure**: DIT, NOC
- **Architecture**: Circular Dependency Detection

Quick Start
-----------

[](#quick-start)

```
# Install
composer require --dev fractalizer/ai-mess-detector

# Analyze
bin/aimd check src/

# With specific format
bin/aimd check src/ --format=json

# Pre-commit hook
bin/aimd hook:install
```

Output Formats
--------------

[](#output-formats)

FormatUse Case`text`CLI, human-readable`json`CI/CD integration`checkstyle`Jenkins, SonarQube`sarif`GitHub Security, VS Code`gitlab`GitLab Code QualityConfiguration
-------------

[](#configuration)

Create `aimd.yaml`:

```
rules:
  complexity:
    warning_threshold: 10
    error_threshold: 20

  cognitive:
    warning_threshold: 15
    error_threshold: 30
```

Or use CLI options:

```
bin/aimd check src/ --cyclomatic-warning=10 --cyclomatic-error=20
```

Git Integration
---------------

[](#git-integration)

```
# Analyze staged files only
bin/aimd check src/ --analyze=git:staged

# Show violations in changed files
bin/aimd check src/ --report=git:main..HEAD
```

Baseline Support
----------------

[](#baseline-support)

```
# Generate baseline for existing violations
bin/aimd check src/ --generate-baseline=baseline.json

# Use baseline
bin/aimd check src/ --baseline=baseline.json
```

Documentation
-------------

[](#documentation)

- [Quick Start](docs/QUICK_START.md)
- [Architecture](docs/ARCHITECTURE.md)
- [GitHub Action](docs/GITHUB_ACTION.md)
- [Changelog](CHANGELOG.md)
- [llms.txt](https://fractalizer.github.io/php_ai_mess_detector/llms.txt) — concise reference for AI agents
- [llms-full.txt](https://fractalizer.github.io/php_ai_mess_detector/llms-full.txt) — complete documentation in a single file

Requirements
------------

[](#requirements)

- PHP 8.4+
- Composer

Development
-----------

[](#development)

```
composer install
composer test      # Run tests
composer phpstan   # Static analysis
composer check     # Full validation
```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance79

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

120d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/318489?v=4)[Vladislav Rastrusny](/maintainers/FractalizeR)[@FractalizeR](https://github.com/FractalizeR)

---

Tags

phpclistatic analysismess detectorMetricscode qualityarchitecturecomplexity

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fractalizer-ai-mess-detector/health.svg)

```
[![Health](https://phpackages.com/badges/fractalizer-ai-mess-detector/health.svg)](https://phpackages.com/packages/fractalizer-ai-mess-detector)
```

###  Alternatives

[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
