PHPackages                             alex-kassel/laravel-actionable-diagnostics - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. alex-kassel/laravel-actionable-diagnostics

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

alex-kassel/laravel-actionable-diagnostics
==========================================

Multichannel diagnostic event engine, actionable exception taxonomy, event buffering, and AI agent remediation package for PHP 8.2+ and Laravel.

v1.0.3(today)018↑2733.3%MITPHPPHP ^8.2CI passing

Since Aug 18Pushed todayCompare

[ Source](https://github.com/alex-kassel/laravel-actionable-diagnostics)[ Packagist](https://packagist.org/packages/alex-kassel/laravel-actionable-diagnostics)[ Docs](https://packagist.org/packages/alex-kassel/laravel-actionable-diagnostics)[ RSS](/packages/alex-kassel-laravel-actionable-diagnostics/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

🩺 Laravel Actionable Diagnostics
================================

[](#-laravel-actionable-diagnostics)

 **Multichannel diagnostic event engine, actionable exception taxonomy, event buffering, and AI agent remediation framework**

 [Installation](#installation) • [Configuration](#configuration) • [Quick Start](#quick-start) • [Release Gate](RELEASE-GATE.md) • [Changelog](CHANGELOG.md)

 [![Audit Verified](https://camo.githubusercontent.com/ad42f3e373736ebfc17d1a0f7e929dd1de73284cbeadb5f24488b9dacb7eef9a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41756469742d56657269666965642d3130623938313f6c6f676f3d736869656c64)](RELEASE-GATE.md) [![Latest Version](https://camo.githubusercontent.com/8cb3de35bf90b044d551c26bcd533c3b5667a75c42384820b32ec0b7dd9187d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c65782d6b617373656c2f6c61726176656c2d616374696f6e61626c652d646961676e6f73746963733f636f6c6f723d663539653062266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/alex-kassel/laravel-actionable-diagnostics) [![Laravel Support](https://camo.githubusercontent.com/32bb20867c064c55c8d525a65a804cf541a083615e3e1810d8098774901ac762/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d6666326432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com) [![PHP Support](https://camo.githubusercontent.com/efb9e9ab96e9febd681c962354b111daa4f2cddccc85b9571e7452145877aeb2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d3737376262343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net) [![PHPStan Level Max](https://camo.githubusercontent.com/12a851c30b0a4a96268ec381d89ec543bf69a5d6f5141ae80ee15422cf410420/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c2532304d61782d3862356366363f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](RELEASE-GATE.md)

---

**Laravel Actionable Diagnostics** is a multichannel diagnostic event engine and actionable exception taxonomy framework for PHP 8.2+ and Laravel applications. It bridges runtime observability with automated AI remediation by turning exceptions and log events into structured, actionable problem definitions with step-by-step resolution prompts.

---

Key Features
------------

[](#key-features)

- **Single-Line Developer DX:** Clean convenience facade (`Diagnostics::fatal()`, `Diagnostics::recoverable()`, `Diagnostics::operational()`, `Diagnostics::record($dto)`).
- **Actionable Error &amp; Event Taxonomy:** Machine-readable diagnostic codes, severity levels (`FATAL`, `RECOVERABLE`, `OPERATIONAL`), human remediation steps, and AI resolution prompts.
- **Event Aggregation &amp; Summary Flushing:** In-memory event buffering to prevent log spam, flushing aggregated summary reports on process completion or item threshold.
- **Dual Ingestion &amp; Dispatch:** Local in-process PHP invocation and optional remote REST API (`POST /api/diagnostics/report`), dispatching to Monolog PSR-3 log channels, Laravel Events, and HTTP POST Webhooks.
- **Sensitive Data Masking:** Automatic recursive redaction of credentials, tokens, and private keys across log files and webhook payloads.
- **AI Agent Friendly Markdown Output:** Formats diagnostic alerts into structured GitHub Markdown blocks (`> [!CAUTION]`) with clear resolution instructions.

---

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

[](#requirements)

- **PHP:** 8.2+ (tested on 8.2, 8.3, 8.4)
- **Laravel Framework:** 11.x | 12.x | 13.x

---

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require alex-kassel/laravel-actionable-diagnostics
```

The service provider and `Diagnostics` facade will automatically register via Laravel package discovery.

Optionally publish the configuration file:

```
php artisan vendor:publish --tag="actionable-diagnostics-config"
```

---

Configuration
-------------

[](#configuration)

The published `config/actionable-diagnostics.php` configuration file allows fine-tuning buffer sizes, webhook targets, API keys, and masking keys:

```
return [
    'project_slug' => env('DIAGNOSTICS_PROJECT_SLUG', 'default-app'),
    'environment'  => env('APP_ENV', 'production'),
    'api_key'      => env('DIAGNOSTICS_API_KEY', null),

    'routes' => [
        'enabled' => env('ACTIONABLE_DIAGNOSTICS_ROUTES_ENABLED', false),
        'prefix'  => env('ACTIONABLE_DIAGNOSTICS_ROUTES_PREFIX', 'api/diagnostics'),
    ],

    'buffer' => [
        'enabled'              => env('DIAGNOSTICS_BUFFER_ENABLED', true),
        'max_items'            => (int) env('DIAGNOSTICS_BUFFER_MAX_ITEMS', 100),
        'max_lifetime_seconds' => (int) env('DIAGNOSTICS_BUFFER_MAX_LIFETIME', 300),
    ],

    'masking' => [
        'enabled'        => true,
        'redaction_text' => '***REDACTED***',
        'keys'           => [
            'password', 'pass', 'secret', 'bearer', 'token',
            'api_key', 'authorization', 'credit_card', 'ssn',
            'private_key', 'cookie', 'db_password',
        ],
    ],

    'webhooks' => [
        'enabled' => env('DIAGNOSTICS_WEBHOOK_ENABLED', false),
        'urls'    => array_values(array_filter(explode(',', (string) env('DIAGNOSTICS_WEBHOOK_URLS', '')))),
        'timeout' => (int) env('DIAGNOSTICS_WEBHOOK_TIMEOUT', 5),
    ],
];
```

---

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

[](#quick-start)

### 1. Recording Recoverable / Operational Events

[](#1-recording-recoverable--operational-events)

```
use AlexKassel\LaravelActionableDiagnostics\Facades\Diagnostics;

Diagnostics::recoverable(
    code: 'ERR_RATE_LIMIT_EXCEEDED',
    message: 'Upstream vendor API returned 429 Too Many Requests',
    context: ['vendor' => 'stripe', 'retry_after_seconds' => 60],
    remediationSteps: [
        'Check upstream vendor status page',
        'Verify exponential backoff settings in config/services.php',
    ],
    agentInstructions: 'Inspect rate limit headers and apply backoff multiplier.'
);
```

### 2. Actionable Exceptions

[](#2-actionable-exceptions)

```
use AlexKassel\LaravelActionableDiagnostics\Exceptions\BaseActionableException;
use AlexKassel\LaravelActionableDiagnostics\Enums\ErrorSeverityEnum;

class UpstreamServiceUnavailableException extends BaseActionableException
{
    protected string $diagnosticCode = 'ERR_UPSTREAM_UNAVAILABLE';
    protected ErrorSeverityEnum $severity = ErrorSeverityEnum::FATAL;
    protected array $remediationSteps = [
        'Verify network connectivity and firewall rules',
        'Check DNS resolution for api.vendor.com',
    ];
    protected string $agentInstructions = 'Review upstream connection logs and test endpoint with curl.';
}
```

```
use AlexKassel\LaravelActionableDiagnostics\Facades\Diagnostics;

try {
    // Risky upstream call
} catch (UpstreamServiceUnavailableException $e) {
    Diagnostics::fatal($e);
}
```

---

Testing
-------

[](#testing)

Run unit and integration test suites:

```
# Run test suite
php artisan test -c packages/alex-local/laravel-actionable-diagnostics/phpunit.xml

# Run static analysis
vendor/bin/phpstan analyse packages/alex-local/laravel-actionable-diagnostics/src --level=max
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [Security Policies](https://github.com/alex-kassel/laravel-actionable-diagnostics/security/policy) on how to report vulnerabilities.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~7 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f11bb887e4e2c6eb34ec331939e34acf86591a4a2cafce3e9e7bbe9aeb950708?d=identicon)[Alexander Macenko](/maintainers/Alexander%20Macenko)

---

Top Contributors

[![alex-kassel](https://avatars.githubusercontent.com/u/144229516?v=4)](https://github.com/alex-kassel "alex-kassel (11 commits)")

---

Tags

ai-agentdiagnosticslaravellaravelloggingexceptionswebhooksmonologdiagnosticsai-agentremediation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alex-kassel-laravel-actionable-diagnostics/health.svg)

```
[![Health](https://phpackages.com/badges/alex-kassel-laravel-actionable-diagnostics/health.svg)](https://phpackages.com/packages/alex-kassel-laravel-actionable-diagnostics)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k16.3M158](/packages/laravel-pulse)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M147](/packages/roots-acorn)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)

PHPackages © 2026

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