AI-assisted development
With Scramble, your Laravel code is the API contract. Validation rules, API Resources, PHP types, middleware, and routes determine the generated OpenAPI document.
AI agents often respond to documentation tasks by adding attributes or PHPDoc that repeat what Scramble already knows. When a manual schema replaces inference, later changes to your application types no longer flow into the documentation. You are left maintaining two contracts that can drift apart.
Scramble’s Laravel Boost integration teaches agents to keep application types precise and let Scramble infer from them. Manual documentation still has a place for information the code cannot express, such as descriptions, examples, or genuinely unresolvable types. It should fill a gap instead of restating the source code.
From assumption to verification
Writing plausible Laravel code is not enough to know that the resulting API documentation is correct. The Scramble skill gives the agent a workflow for evaluating the generated OpenAPI document with Scramble’s built-in commands.
After changing an endpoint, the agent can export only the affected named routes:
php artisan scramble:export \ --routes=users.show,users.update \ --stdout \ --fail-on-unknownIt then checks the actual request parameters, response schemas, status codes, resource wrapping, pagination, and authentication requirements. It also reads Scramble’s diagnostics instead of treating a successful command as proof that the contract is accurate.
For API-wide work, the agent can start with diagnostics without loading a large OpenAPI document:
php artisan scramble:analyze --fail-on-unknownThis creates a useful feedback loop: change the application code, generate its contract, inspect the result, and correct the source of any mismatch. The agent does not have to assume what Scramble inferred.
Install Laravel Boost
Laravel Boost is an official package built and maintained by the Laravel team. It is installed only as a development dependency. Scramble plugs its guidelines and skill into Boost’s existing agent workflow, alongside guidance for Laravel and other supported ecosystem packages.
Install Boost as a development dependency in your Laravel application:
composer require laravel/boost --devThen run the interactive installer:
php artisan boost:installSelect the AI agents you use and enable both guidelines and Agent Skills when prompted. Boost detects dedoc/scramble in your application and installs Scramble’s resources alongside the guidance for Laravel and your other supported packages.
If you already use Boost, rerun php artisan boost:install and enable Agent Skills to discover Scramble’s integration.
What the Scramble skill provides
The scramble-development skill teaches your agent to:
- preserve validation rules, API Resources, model casts, return types, and concrete values as the source of the API schema;
- avoid attributes and PHPDoc that merely repeat information Scramble already infers;
- add manual documentation narrowly when information cannot be expressed or resolved from application code;
- inspect routes and existing Scramble configuration before making changes;
- verify affected endpoints against a focused OpenAPI export;
- read Scramble diagnostics before changing application code;
- distinguish missing type information from a Scramble limitation or likely bug;
- choose the narrowest appropriate fix, such as improving a PHP type, adding a focused attribute, or creating an extension.
Using the skill
Ask your agent to work on the API as you normally would. Agents that support skills can load scramble-development automatically when the task involves Scramble or an API contract. You can also name the skill explicitly:
Using the
scramble-developmentskill, add an endpoint for updating a user’s profile and verify its generated OpenAPI documentation.
Keep the guidance up to date
After updating Scramble or Laravel Boost, refresh the generated guidelines and installed skills:
php artisan boost:updateUse --discover to let Boost check for newly available guidelines and skills:
php artisan boost:update --discoverSee Laravel’s AI-assisted development documentation for supported agents and the rest of the Boost workflow.