geanruca / laravel-coherence
A Laravel package for AI-based data coherence validation in you Eloquent Models
v1.0.1-alpha
2025-05-19 19:41 UTC
Requires
- php: ^8.1
- illuminate/support: ^10.0|^11.0
- prism-php/prism: ^0.67.0
Requires (Dev)
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2025-06-19 19:50:26 UTC
README
Laravel Coherence is a developer tool that uses AI (via Prism) to validate whether the attributes of your Eloquent models are logically coherent before they are saved. It's useful for catching absurd or invalid values early, especially in data-critical applications.
🚀 Features
- 🔎 Coherence validation using LLMs (OpenAI, etc.)
- 📚 Automatic or manual model description
- 🧠Dynamic prompt generation with model context
- 🛑 Strict mode (throws exception) or safe mode (logs result)
- 📋 Polymorphic logging of all coherence checks
📦 Installation
composer require geanruca/laravel-coherence