Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Ai Verify Laravel Package

semitexa/laravel-ai-verify

AI-powered verification for Laravel: validate user input, content, and requests through configurable AI checks with a simple, fluent API. Drop-in service provider, customizable prompts, and sensible defaults make it easy to add intelligent verification to any app.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the package as a dev dependency and publish its config:

composer require --dev <vendor>/ai-verify
php artisan vendor:publish --tag=ai-verify-config

The first thing to read is config/ai-verify.php. It is where the Boost/MCP integration is toggled (ai-verify.mcp.boost) and where suite/timeout defaults live. Next, read the guideline and agent skill the package ships — with Boost installed these get surfaced to the agent, and they name the tools, so they double as the canonical usage documentation.

First use case: run a verification and look at the JSON shape.

php artisan ai-verify --json

Get comfortable with the verdict field (pass / fail) and the surrounding payload before wiring it into an agent. A fail is a normal result, not an error — the payload is the useful part.

If you use Laravel Boost, install laravel/boost and laravel/mcp, restart the Boost MCP server, and confirm ai-verify, ai-graph, and ai-verify-receipt appear in your agent's tool list. There is nothing to register by hand: the package adds itself to Boost's boost.mcp.tools.include list only when laravel/mcp is present.

Implementation Patterns

Agent loop: edit → verify → repair. The intended daily workflow is to let the agent make changes and then call the ai-verify tool rather than shelling out. Because Boost executes each MCP call in a fresh process, the tool always sees the agent's latest edits — no reload, no stale snapshot, no need to bounce the MCP server between turns.

Graph before, receipt after. Use ai-graph when the agent needs orientation (what nodes/tests/impact surface a change touches) before editing, and ai-verify-receipt to produce an impact report/receipt for the change set. The receipt is the artifact to attach to a PR description or keep in the agent transcript; the verdict is the gate.

Two consumers, one output. Treat --json as the contract. In CI, run the artisan command and rely on the exit code plus the JSON; inside an agent, call the MCP tool and parse the JSON, ignoring exit semantics entirely. Same payload, different failure handling.

Conditional registration is the integration point. The tools are included via Boost's boost.mcp.tools.include only when laravel/mcp is installed. If you maintain your own Boost tool list, verify the merge rather than assuming the package's entries survive your customization.

Tune timeouts per call, not globally. ai-verify accepts a timeout argument for long suites; Boost's default is 180 seconds. Pass an explicit timeout on the tool call for slow suites rather than raising it everywhere.

Opt out per environment. AI_VERIFY_MCP_BOOST=false in the environment, or ai-verify.mcp.boost => false in config, disables the Boost tools without uninstalling anything. Useful for CI runners and for developers who want the CLI but not the MCP surface.

Gotchas and Tips

  • Silent no-op without laravel/mcp. No Boost, no tools, no warning. If the agent can't see ai-verify, check that both laravel/boost and laravel/mcp are installed before debugging anything else.
  • A fail verdict is an answer, not a tool error. Don't build MCP-level retry or error-handling around it — inspect the JSON verdict and the payload. Retrying on fail just re-runs the same failing suite.
  • 180-second default is easy to hit. Long suites will time out and look like a broken tool. Set the timeout argument on ai-verify calls explicitly, and keep suite scope tight enough that the default is rarely the constraint.
  • Fresh process per call has a cost. Correctness is better (always current), but every call pays cold-start. Avoid chatty loops of many tiny verify calls; batch edits and verify once per meaningful change.
  • Environment variables must reach Boost's process. AI_VERIFY_MCP_BOOST is read in the MCP server's process, not your interactive shell. Set it where Boost is launched, and make sure boolean casting is explicit — a string "false" is a common footgun in config files.
  • Check tool registration after upgrades. Because inclusion happens through Boost's boost.mcp.tools.include list, a Boost upgrade or a re-published config can drop the entries. Verify the tools are listed after bumping laravel/boost.
  • Pin the version in agent contexts. Agents parse the JSON; a payload change between releases breaks parsing quietly. Keep the package version aligned across the team and CI.
  • Extension points worth knowing: the config file (suite definitions, Boost toggle, defaults), the shipped guideline/skill files (edit these to change how the agent is instructed to use the tools), and the receipt output (store or attach it as part of your PR workflow).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core