The New Era of Laravel Upgrades Laravel 13 introduces a seismic change in how developers maintain their codebases with the arrival of Laravel Boost. This AI-driven tool promises a hands-off upgrade path directly from the terminal. However, the venerable Laravel Shift remains the community standard for automated migrations. Choosing between them isn't just about speed; it's about the technical philosophy you want to apply to your project's evolution. Laravel Boost: The Speed of Compatibility The core Laravel team designed Boost for efficiency. By running a simple AI skill command, it handles the heavy lifting of dependency management and fundamental breaking changes. In practice, Boost identifies the bare minimum required to make your application functional on the new version. It updates the `composer.json` for core framework components, adjusts CSRF middleware names, and updates config cache settings. It then validates these changes with a test suite. It's a quick, pragmatic approach, but it often leaves the deeper, more cosmetic or structural improvements of the skeleton untouched. Laravel Shift: The Deterministic Deep Clean Shift takes a different path by focusing on a "native-first" philosophy. It doesn't just make your code work; it makes it look like it was born in Laravel 13. This service performs dozens of micro-tasks, such as introducing new PHP attributes for Eloquent, indexing expiration columns in cache tables, and cleaning up factory definitions. It even bumps minor frontend dependencies and first-party packages that Boost overlooks. Because Shift uses a deterministic engine rather than probabilistic AI, it delivers a consistent, albeit opinionated, result every time. Critical Analysis: Trade-offs and Pain Points Boost wins on convenience but lacks thoroughness. It might miss PHP 8.3 version bumps or secondary package updates. Shift, while comprehensive, can feel intrusive. It occasionally forces specific code styles or PHP attributes that might not align with your team's internal standards. Reviewing a Shift PR requires a discerning eye to revert unwanted stylistic changes. The Final Verdict Use Boost for small, internal projects where speed is king and technical debt is low. For production-grade applications, Laravel Shift remains essential. It ensures your skeleton stays modern and identifies obscure changes buried deep in the framework's release notes. Shift isn't just an upgrader; it's a comprehensive code reviewer.
Laravel Boost
Products
- Mar 23, 2026
- Mar 18, 2026
- Mar 17, 2026
- Mar 12, 2026
- Mar 10, 2026
Overview AI models like Claude and GPT have reached a point where they can generate functional code with minimal prompting. However, "functional" is not synonymous with "production-ready." Default configurations often miss project-specific nuances, especially within the Laravel ecosystem. By implementing custom guidelines, developers can move beyond generic code generation to enforce architectural integrity, automated testing, and specific framework requirements like Filament themes. Prerequisites To implement these strategies, you should have a solid grasp of the Laravel framework and the Filament TALL stack. Familiarity with AI agentic workflows—specifically using tools like Claude Code or Laravel Boost—is essential for integrating markdown-based rule files into your development cycle. Key Libraries & Tools * **Laravel**: The primary PHP framework used for web application development. * **Filament**: An admin panel and TALL stack toolkit for Laravel. * **Claude Code**: An AI agent designed to interact directly with your local codebase. * **Laravel Boost**: A tool for managing and applying custom developer guidelines to AI prompts. Code Walkthrough To enforce specific standards, you must create a `.md` file (e.g., `guidelines.md`) that the AI agent reads before generating code. Below is a conceptual example of how to structure a rule for Filament smoke tests. ```markdown Testing Rules - For every new Filament Resource, you MUST generate a Pest or PHPUnit smoke test. - The test must verify that the list, create, and edit pages return a 200 status code. ``` When the AI processes this, it checks its output against the directive. Without this specific prompt, models often skip testing to speed up generation, leaving you with technical debt. Another critical rule involves Tailwind CSS integration within Filament custom pages: ```markdown Filament Custom Themes - If a custom Blade view includes Tailwind classes, automatically generate a custom Filament theme. - Register the theme in the Panel Provider to ensure CSS is compiled correctly. ``` Syntax Notes Custom guidelines rely on clear, imperative language. Use strong verbs like "MUST," "ALWAYS," or "NEVER." Structure these in Markdown format within specialized files like `CLAUDE.md` or `agents.md`. AI agents prioritize these local instructions over their general training data, allowing you to override default behaviors such as PHP Facade usage in favor of helper functions. Practical Examples A common real-world application is the enforcement of Enums across a project. Instead of allowing the AI to use hard-coded strings for statuses, a guideline can mandate that all status fields utilize a specific Enum directory. This ensures that when the AI generates a Filament table, it automatically implements the `HasLabel` and `HasColor` interfaces, providing a consistent UI without manual refactoring. Tips & Gotchas Avoid over-complicating your guidelines with minor stylistic preferences. High-noise guidelines can overwhelm the model's context window, leading it to ignore more critical instructions like security protocols or test generation. Focus your custom rules on high-impact areas: test enforcement, complex framework configurations, and project-specific architectural patterns.
Mar 1, 2026Overview: The Context Overload Scenario Technical debt isn't just in your code; it's increasingly found in the metadata feeding your AI agents. This analysis examines an experiment where CLAUDE.md files—markdown documents designed to guide Claude through project-specific rules—were stripped from five distinct Laravel projects. The goal was to determine if these instruction sets provide genuine value or simply act as high-latency noise that bloats token usage and slows down development velocity. Key Strategic Decisions: Cutting the Cord The primary move involved a complete removal of CLAUDE.md and AGENTS.md files across varied tech stacks: React, Vue.js, Livewire, Filament, and a standard API. Instead of relying on pre-baked guidelines, the experiment forced the LLM to rely on its internal training and immediate MCP tools like Laravel Boost. This strategy tested the "Zero-Shot" capabilities of modern models against the industry trend of massive context injection. Performance Breakdown: Speed vs. Precision The results were immediate and jarring. Without the markdown guidelines, the AI achieved nearly a **2x increase in speed**. For the API project, the session was completed in just 73 seconds. Token consumption plummeted, dropping from 31% of the session limit down to a lean 13%. This suggests that large instruction files force the model to "run in circles" to ensure compliance with every minor formatting rule, wasting computational resources on non-functional requirements. Critical Moments: The Filament Failure The success streak hit a wall with Filament. While the AI successfully generated working CRUDs for well-known frameworks, it failed on the less ubiquitous Filament admin panel. Without CLAUDE.md to enforce documentation lookups, the model defaulted to outdated version 3 syntax instead of the required version 4. Crucially, the AI skipped running automated tests entirely. This highlights a dangerous blind spot: without explicit enforcement in the context file, agents prioritize speed over verification. Future Implications: Lean Context Architecture Blindly deleting your context files is a mistake, but the bloated "slash-init" defaults are clearly suboptimal. The move forward is a **Minimalist Context** strategy. You must retain two critical directives: test enforcement and documentation lookup triggers. Forcing the agent to verify its own work and consult the latest docs covers the gaps where internal model training fails. Efficiency doesn't come from removing instructions, but from ensuring every line of your CLAUDE.md earns its keep in saved tokens.
Feb 25, 2026The New Model on the Block Google recently launched Gemini 3.1 Pro within its Antigravity IDE, promising a significant leap in developer productivity. To see if the hype holds water, I put the model through a rigorous gauntlet: seven Laravel projects requiring complex API CRUD generation. While the integration feels seamless on the surface, the actual developer experience reveals a model still finding its footing in a competitive market. Performance and Latency Issues Speed defines the modern coding workflow. Unfortunately, Gemini 3.1 Pro lags behind. In side-by-side testing against Claude 3.5 Sonnet, Google's offering took six minutes to complete a task that Anthropic models finished in three. The model frequently pauses to calculate small details, launching internal help tools like "PHP design help" just to scaffold basic models. This suggests a lack of deep, native training on modern PHP frameworks. The Testing Gap and Agent Intelligence One glaring omission in the initial output was the lack of automated tests. While Gemini 3.1 Pro successfully generated models, factories, and controllers, it ignored the crucial step of verification. However, the model showed a flash of brilliance when prompted about this failure. It recognized its own "skills" via Laravel Boost and proactively corrected the mistake, eventually delivering 53 passing tests. This ability to discover and activate tools mid-stream is a clear positive, even if it requires manual intervention. Reliability and Quota Hurdles The Antigravity IDE experience remains plagued by stability issues. Random crashes and "terminated due to error" messages interrupted the workflow multiple times. Worse, the free tier quota is incredibly opaque. After only nine minutes of work on a Livewire project, the system cut off access entirely. Unlike the clear usage metrics provided by OpenAI, Google leaves developers guessing about how much "intelligence" they actually have left. Final Verdict: Catching Up Gemini 3.1 Pro is currently a secondary choice for heavy-duty Laravel development. It feels like a product in a "catching up" phase rather than a market leader. While the Gemini CLI shows promise for future MCP support, the current speed and reliability gaps make it hard to recommend over the more polished offerings from Anthropic.
Feb 20, 2026Overview: The Unified AI Strategy for Laravel Building AI features often feels like a fragmented journey. Developers usually jump between specialized APIs for text, separate services for images, and complex libraries for audio transcription. The Laravel AI SDK changes this by providing a unified, first-party toolkit that handles the heavy lifting of AI integration. It treats AI as a core application concern, much like how Laravel handles databases or queues. By abstracting the differences between providers like OpenAI, Anthropic, and Gemini, it allows you to write cleaner, more maintainable code that isn't locked into a single vendor's API. Taylor Otwell designed the SDK to feel "Laravel-esque." This means leaning into conventions like class-based agents, fluent API chains, and deep integration with the existing Laravel ecosystem. Whether you need to summarize an issue in a project management tool, generate realistic speech via ElevenLabs, or perform semantic search on a mountain of PDFs, the SDK provides the scaffolding to do it efficiently. It moves AI from being an experimental add-on to a standard part of the modern developer's workflow. Prerequisites and Environment Setup Before you begin building, ensure you have a standard Laravel environment ready. You should be comfortable with PHP, Composer, and basic Laravel concepts like controllers and service providers. You will also need API keys from at least one AI provider. While the SDK supports local models via Ollama, production applications typically require keys for OpenAI or Anthropic. To get started, install the package via Composer: ```bash composer require laravel/ai ``` After installation, publish the configuration and migrations: ```bash php artisan vendor:publish --tag="ai-config" php artisan vendor:publish --tag="ai-migrations" php artisan migrate ``` The configuration file (`config/ai.php`) allows you to define your default providers. You can set different defaults for different modalities—for instance, using Claude for text and DALL-E for images. This flexibility is a core strength of the SDK. Key Libraries & Tools * **Laravel AI SDK**: The primary toolkit for interacting with LLMs, image generators, and audio services. * **Prism**: A community package by TJ Miller that serves as the query builder layer for the SDK's text generation. * **ElevenLabs**: Integrated for high-quality text-to-speech capabilities. * **Ollama**: Enables running local models for development and testing without incurring API costs. * **Laravel Boost**: A local MCP server that provides AI agents with context about your specific Laravel codebase. * **PostgreSQL with PGVector**: Used for storing and searching vector embeddings locally. Code Walkthrough: Implementing Agents and Tools 1. Creating an Agent The Agent class is the heart of the SDK. It encapsulates the identity of your AI. Instead of passing long strings of instructions in every controller, you define them once in a reusable class. You can generate one using the Artisan command: ```bash php artisan make:agent SalesCoachAgent ``` In the generated class, you define the system prompt and the models to use. The `instructions` method is where you set the "personality" and guardrails for the agent. ```php namespace App\Agents; use Laravel\AI\Agent; class SalesCoachAgent extends Agent { public function instructions(): string { return "You are an expert sales coach. Analyze the provided transcript and offer three actionable improvements."; } } ``` 2. Using Structured Output One of the most powerful features is getting the AI to return data in a specific format rather than a messy string. The SDK uses a JSON Schema builder to ensure the model follows your rules. This makes it possible to save AI responses directly into your database without fragile regex parsing. ```php use App\Agents\SalesCoachAgent; use Laravel\AI\Schema; $agent = new SalesCoachAgent(); $response = $agent->predict( prompt: "Analyze the call from yesterday.", schema: Schema::object([ 'sentiment' => Schema::string()->description('Overall tone of the customer'), 'score' => Schema::integer()->description('Score from 1-10'), 'follow_up_needed' => Schema::boolean(), ]) ); // Access data directly as an array echo $response['sentiment']; ``` 3. Integrating Tools (Function Calling) Tools allow your AI to actually *do* things. You can give an agent the ability to search the web, fetch a URL, or even query your own database. The SDK comes with several provider tools built-in, but you can also write your own custom tools by extending the `Tool` class and implementing a `handle` method. ```php use Laravel\AI\Tools\WebSearch; class ResearcherAgent extends Agent { public function tools(): array { return [ new WebSearch(), ]; } } ``` When you prompt this agent, it will realize it needs more info, call the `WebSearch` tool, and then use the results to finish its answer. This turns a static LLM into a dynamic assistant. Syntax Notes: Attributes and Traits The Laravel AI SDK makes heavy use of PHP attributes to simplify configuration. These attributes allow you to stay updated with the latest model advancements without changing your code logic. * **`#[UseCheapestModel]`**: Instructs the SDK to use the most cost-effective model for a specific provider (e.g., GPT-4o-mini or Claude Haiku). This is perfect for simple tasks like summarization. * **`#[UseSmartestModel]`**: Forces the use of the flagship model (e.g., Claude 3.7 Sonnet) for tasks requiring high reasoning capabilities. * **`RemembersConversations` trait**: Adding this to your agent automatically manages database storage for chat history, ensuring the AI remembers previous messages without you manually passing a growing array of context. Practical Examples: The 'Larvis' Workflow A practical application of this tech is building a voice-enabled assistant like "Larvis." The workflow demonstrates the multi-modal nature of the SDK: 1. **Transcription**: The user uploads an audio file of their question. The SDK uses a `transcribe` method (typically via Whisper) to convert audio to text. 2. **Context Retrieval**: The agent fetches relevant local documents (like Markdown files) and injects them into the prompt to provide specific knowledge the LLM wasn't trained on. 3. **Inference**: The agent generates a text response based on the transcription and the local documents. 4. **Speech Synthesis**: The text response is passed to the `audio` method, using ElevenLabs to generate a high-quality voice response that is sent back to the user. This entire pipeline, which would previously take dozens of different library integrations, can now be handled in a single Laravel controller using less than 50 lines of code. Tips & Gotchas * **Context Bloat**: Be careful not to attach too many tools or files to every request. Every tool definition and message in a conversation history consumes tokens, which increases latency and cost. Use the `RemembersConversations` settings to prune old messages. * **Failover Logic**: In production, always define a fallback provider. If OpenAI is experiencing downtime or you hit a rate limit, the SDK can automatically switch to Anthropic to keep your app running. * **Local Development**: Use Ollama for your daily coding to save money. You can switch your local `.env` to point the AI provider to `http://localhost:11434` to test your logic for free. * **Async Processing**: For long-running tasks like transcribing a massive video file or generating a complex image, use the `queue` method. This offloads the work to your Laravel worker and prevents your web request from timing out.
Feb 9, 2026The New Standard in AI-Assisted Development The landscape of AI-driven coding shifted overnight with the simultaneous release of Claude Opus 4.6 and GPT-5.3 Codex. For developers, the choice between Anthropic and OpenAI often comes down to a trade-off between speed and architectural depth. Historically, Claude dominated the speed game, while Codex provided the "plan B" for complex logic. This latest iteration changes that dynamic, forcing a re-evaluation of which model belongs in a professional workflow. Key Features and Architectural Alignment Testing these models requires a modern stack. Using the fresh Laravel AI SDK, both models demonstrated an impressive ability to ingest new technical skills via Laravel Boost. This "skill-based" learning allows the LLMs to utilize documentation they weren't originally trained on. GPT-5.3 Codex stood out by automatically generating automated tests and implementing robust error handling without explicit prompting. Claude Opus 4.6, meanwhile, focused on a polished user experience and cleaner, more immediate UI implementations. Analysis: The Speed-to-Quality Ratio The most shocking revelation in this head-to-head is the closing speed gap. GPT-5.3 Codex formerly dragged behind Opus, often taking twice as long to generate files. Now, Codex matches Opus second-for-second in simple tasks and remains within 20-30% of its speed on massive, multi-phase projects. However, Codex occasionally makes questionable executive decisions, such as downgrading an image model to Gemini 2.5 Flash to save tokens—a move that resulted in typos and lower quality. Opus is more faithful to the default high-quality settings but tends to take shortcuts, missing hard-coded URLs and failing to update documentation during complex refactors. Final Verdict and Recommendation If you value "production-ready" code that anticipates future edge cases, GPT-5.3 Codex is the superior architect. It provides significantly more depth in forward-thinking patterns and rigorous testing. Claude Opus 4.6 remains the king of the frontend and rapid prototyping, offering a better "terminal UX" and cleaner coding style. For most senior developers, the recommendation is clear: use Codex for the heavy lifting and backend logic, but let Opus handle the final UI polish. At nearly a quarter of the price of the Anthropic $100 Max plan, GPT-5.3 Codex currently offers the best value in the high-end LLM market.
Feb 6, 2026Overview: The Context Gap in AI Development AI agents have changed how we write code, but they often struggle with the nuances of specific frameworks. Standard models like Claude 3.5 Sonnet or GPT-4o possess vast general knowledge but lack the hyper-specific context of your local Laravel project. This lead to hallucinations, outdated syntax, or the AI suggesting patterns that conflict with your application's architecture. Laravel Boost solves this by acting as a bridge. It injects project-specific metadata, documentation, and "skills" directly into your AI agent's reasoning loop. Instead of manually feeding documentation to a chat window, Boost automates the context delivery. Version 2.0 introduces a major shift from a monolithic guideline approach to a modular, "skills-first" architecture. This reduces context bloat, saves on token costs, and makes the AI significantly more accurate by only providing the information it needs at that exact moment. Prerequisites To follow this guide and implement Boost 2.0, you should be comfortable with the following: * **PHP 8.2+:** Boost 2.0 has officially dropped support for PHP 8.1. * **Laravel 11 or 12:** Older versions like Laravel 10 are supported only by legacy versions of Boost (v1.x). * **Composer:** Basic knowledge of managing PHP dependencies. * **AI Coding Agents:** Familiarity with tools like Cursor, Claude Code, GitHub Copilot, or Juni. Key Libraries & Tools * **Laravel Boost:** The core CLI tool and package that manages AI context and skills. * **Laravel MCP:** A package for building Model Context Protocol servers, allowing AI agents to interact with your app's internal state (routes, database schemas, etc.). * **Remotion:** A React-based framework for programmatic video creation, often used as a demonstration of complex AI skill integration. * **Prism:** A Laravel package for working with LLMs, used to demonstrate how documentation can be bundled directly into vendor folders for AI consumption. Code Walkthrough: Installing and Configuring Boost 2.0 Setting up Boost 2.0 is a methodical process. It begins with the Laravel installer and moves into a randomized, aesthetically pleasing configuration CLI. 1. Installation First, ensure your Laravel installer is up to date to access the built-in Boost prompts during new project creation. If you are adding it to an existing project, use Composer: ```bash composer require laravel/boost --dev ``` 2. Initialization Run the install command to start the interactive configuration. ```bash php artisan boost:install ``` This command triggers a CLI interface featuring randomized gradients—a touch of "developer joy" added by Pushpak Chhajed. You will be prompted to select which features to configure: AI Guidelines, Agent Skills, or the MCP server. 3. Selecting Your AI Agent Boost 2.0 simplifies agent selection. Instead of choosing both an IDE and an agent, you now choose the specific agentic tool you use daily, such as Claude Code or Cursor. Boost will then automatically determine the correct file paths for these tools. 4. Automated Skill Syncing To ensure your AI context stays updated as your project evolves, add the update command to your `composer.json` file: ```json "scripts": { "post-update-cmd": [ "@php artisan boost:update" ] } ``` This ensures that every time you update your dependencies, Boost re-scans your `composer.json` and syncs the relevant skills for packages like Inertia, Tailwind CSS, or Livewire. Deep Dive into Skills vs. Guidelines Understanding the distinction between these two features is critical for a clean development workflow. Guidelines: The Global Rules Guidelines are persistent. They contain high-level rules that the AI should *always* know. For example, if you always use Pest for testing or strictly follow an Action-based architecture, these belong in your guidelines. However, shoving every package's documentation into a guideline leads to "context fatigue," where the AI becomes overwhelmed and starts to hallucinate. Skills: The On-Demand Context Skills are modular Markdown files. They aren't loaded into the AI's memory until they are needed. Each skill has a name and a description in its front matter. When you ask the AI to "build a new UI component with Tailwind," the agent sees the keyword "Tailwind," looks at its available skills, and activates the Tailwind CSS skill. This keeps the prompt lean and the output precise. Syntax Notes: Custom Skill Creation Creating a custom skill allows you to automate highly specific tasks, like generating pull request descriptions or adhering to internal API versioning standards. Skills rely on a specific Markdown front matter format. ```markdown --- name: my-custom-skill description: Use this skill when generating API endpoints or PR descriptions. --- My Custom Skill Rules - Always use the `App\Actions` namespace for business logic. - Ensure all API responses are wrapped in a standard `JsonResource`. - Pull Request descriptions must include a 'Breaking Changes' section. ``` When you save this in a local `.boost/skills` directory and run `php artisan boost:update`, Boost replicates this file into the hidden configuration folders of your chosen AI agents (e.g., `.cursor/rules` or `.claudecode/skills`). Practical Examples Automating Pull Requests You can create a skill that teaches an agent how to use the GitHub CLI. By invoking the skill with a slash command (e.g., `/create-pr`), the AI can analyze your staged changes, write a formatted description, and execute the CLI command to open the PR. Package-Specific Intelligence If you build a project using Filament, you don't want the AI thinking about Filament when you are just debugging a console command. By using a Filament skill, the AI only accesses those specific layout and component rules when you are actively working on the admin panel. Tips & Gotchas * **Git Management:** Never commit the auto-generated agent folders (like `.cursor/rules`) to your repository. These are local mirrors. Only commit the `.boost` folder and your `boost.json` file. This allows your teammates to run `boost:install` and get the exact same AI behavior on their machines. * **Hallucination Prevention:** If your AI starts ignoring your project structure, check your guideline length. If it exceeds 500 lines, move package-specific rules into individual skills. * **Legacy Projects:** Do not attempt to use Boost 2.0 on Laravel 10 projects. The dependency tree for the new MCP features and skills requires the modern internals found in Laravel 11 and up. * **Manual Invocation:** If an agent fails to auto-detect a skill, you can usually force it by using a slash command in the chat interface. Most modern agents support `/` to list and select active skills.
Jan 30, 2026Synchronizing AI Logic Managing multiple AI coding assistants like Claude Dev, Cursor, and Open Code often leads to context fragmentation. You define project rules in one tool, but another remains oblivious. Laravel Boost 2.0 solves this by acting as the single source of truth. It synchronizes project-specific logic across all your agents simultaneously, ensuring every tool understands your architectural decisions without manual configuration. Guidelines vs. Agent Skills In earlier versions, Laravel Boost relied heavily on guidelines—global context loaded at the start of every chat. This often bloated the context window and wasted tokens. Boost 2.0 introduces **Agent Skills**, a specialized format based on the emerging Open Code standard. Unlike guidelines, skills load dynamically. Your agent only accesses the Livewire or Pest skill when the current task actually requires that specific expertise. This makes your prompts roughly 40% leaner while maintaining high precision. Implementation and CLI Workflow Setting up Boost 2.0 is straightforward for both new and existing projects. For current applications, use Composer to upgrade the package. If you are starting fresh with the Laravel installer, the setup process now prompts you to configure Boost features immediately. ```bash Add a third-party skill from the community php artisan boost:add-skill remote-dev/remotion Sync changes after manual overrides php artisan boost:update ``` When you add skills, Boost handles the messy work of directory mapping. It knows Claude Dev expects files in `.claudecode/` while others might look in `.ai/`. You manage one `skill.md` file, and Boost distributes it to the correct hidden directories. Custom Overrides and Best Practices Standardized skills are excellent, but your team might have unique conventions. You can override any default skill by mirroring its folder structure within your project's local directory. By placing a custom `skill.md` in your local path and running the update command, you force the AI agents to prioritize your specific instructions over the defaults. For team collaboration, keep your `.ai/` folder in version control but add individual agent folders (like `.claudecode/` or `.cursor/`) to your `.gitignore` to avoid environment conflicts.
Jan 28, 2026Overview: Why Your AI Agent Needs a Boost AI models like Claude and GPT-4 are powerful, but they arrive at your codebase as strangers. They possess a massive, static library of internet-scale training data, but they lack the specific, real-time context of your unique Laravel application. This gap often leads to what developers call "hallucinations"—code that looks correct but fails to follow your team's conventions or uses deprecated patterns. Laravel Boost is designed to solve this context deficiency. It acts as a bridge, packaging your application's routes, configuration, and coding standards into a format that AI agents can ingest and act upon. With the release of Boost 2.0, the focus has shifted from merely providing static instructions to implementing dynamic **Skills** and the **Model Context Protocol (MCP)**. This evolution allows developers to manage the "Context Window"—the finite memory of an AI model—with surgical precision, ensuring the agent only sees what it needs to see to complete a specific task. Prerequisites: Setting the Stage To effectively implement Laravel Boost 2.0, you should have a baseline understanding of the following: * **Modern PHP & Laravel**: Familiarity with PHP 8.2 and Laravel 12 is essential, as Boost 2.0 has moved away from supporting older versions to utilize the latest framework features. * **AI Coding Tools**: You should be using an AI-capable editor or agent such as Claude Dev, Cursor, GitHub Copilot, or Windsurf. * **Command Line Basics**: You will need to interact with the terminal to run Artisan commands for installation and synchronization. Key Libraries & Tools * **Laravel Boost**: The core package that manages guidelines, skills, and the MCP server for AI integration. * **Laravel MCP**: A foundational package that implements the Model Context Protocol, allowing external systems (like your app) to communicate with AI models. * **Composer**: Used for managing dependencies and third-party AI skills. * **MCP Inspector**: A utility for debugging the connection between your editor and the MCP server. Code Walkthrough: Installation and Configuration Setting up Laravel Boost 2.0 is a methodical process. It begins with a standard installation and moves into configuring how the AI interacts with your files. Step 1: Installation Run the following command in your project root: ```bash composer require laravel/boost --dev php artisan boost:install ``` During installation, the CLI will prompt you to select which AI agents you are using (e.g., Cursor, Claude). This is critical because each agent looks for context in different locations—Cursor uses `.cursorrules`, while others might look for `agents.md`. Step 2: Synchronizing Skills and Guidelines Whenever you update your configuration or add custom rules, you must run the update command to rebuild the context files that the AI reads: ```bash php artisan boost:update ``` This command scans your `AI/guidelines` and `AI/skills` directories, composing a unified markdown file (like `claudedev.md`) that represents the current state of your project's rules. Step 3: Customizing Business Logic One of the most powerful features of Boost 2.0 is the ability to inject custom business context. You can publish the configuration file to unlock this: ```bash php artisan vendor:publish --tag=boost-config ``` Inside `config/boost.php`, you can add a `purpose` key. This is where you tell the AI exactly what the app does—for example, "This project is a logistics platform for tracking international shipping containers." ```php return [ 'purpose' => 'A financial dashboard for tracking cryptocurrency tax compliance.', 'coding_style' => 'Spatie', // ... other config ]; ``` Syntax Notes: The Architecture of a Skill A **Skill** in Boost 2.0 is a specialized markdown file that the AI can "invoke" only when needed. This prevents the context window from being cluttered with irrelevant information. The syntax follows a specific pattern: ```markdown Name: Inertia Vue Development Description: Use this skill when building or modifying Vue components within the Inertia.js stack. Implementation Guidelines - Always use the <script setup> syntax. - Utilize Tailwind CSS for all styling. - Ensure all components are stored in the resources/js/Pages directory. ``` The AI reads the `# Description` to decide if the skill is relevant to your current prompt. If you ask to fix a CSS bug, it will pull in the **Tailwind Skill** but ignore the **Database Skill**, saving thousands of tokens. Practical Examples: Real-World Agent Workflows Automated Refactoring with Verification Don't just ask an AI to refactor code; ask it to verify its work using the tools provided by Laravel Boost. A high-level prompt might look like this: "Refactor the `OrderController@store` method to use a Form Request. Use the **Laravel Skill** for validation patterns. Once completed, use the **Tinker Tool** via MCP to create a test order and ensure the database record is created correctly." Documentation Ingestion If you are using a new package that the AI hasn't been trained on, you can use the `search_docs` tool provided by the Boost MCP server. The agent can query the latest Laravel documentation in real-time to find the correct syntax for Laravel 12 features like Pest integration or the newest Inertia helpers. Tips & Gotchas: Navigating the AI Frontier * **The Context Trap**: Be careful not to put too much in your `guidelines`. If your `agents.md` file becomes 10,000 lines long, the AI will lose the thread of your conversation. Move specific package logic into **Skills** so they are only loaded on demand. * **Plan Mode First**: Always use "Plan Mode" in your AI editor before letting it write code. This allows the agent to outline its approach based on the Boost guidelines before it commits to a file structure. * **Sync Often**: If you change a route name or a config value, run `php artisan boost:update`. If you don't, the AI will be working from a "ghost" version of your app's previous state. * **Override Wisely**: Boost comes with sensible defaults for Tailwind and Pest. However, if your team has a unique way of writing tests, create a custom file in `AI/skills/pest.md` to override the default Laravel Boost behavior.
Jan 28, 2026Overview of the New Debugging Paradigm As developers transition to using AI coding agents, a shift in troubleshooting is required. We are no longer just debugging syntax errors or logical flaws in our source code; we are now debugging the **process** of the AI agent itself. When an agent behaves unexpectedly—such as consuming excessive tokens or providing irrelevant context—it often stems from a breakdown in the Model Context Protocol (MCP). This protocol allows AI models to interact with external tools, and if those tools return malformed or bloated data, your context window disappears rapidly. Prerequisites and Key Tools To follow this guide, you should be familiar with the following: - **Claude Code**: The CLI-based agent for Anthropic's Claude models. - **Laravel Framework**: Specifically the Laravel Boost package. - **MCP Architecture**: Understanding how tools provide external data to LLMs. - **Terminal Shortcuts**: Familiarity with CLI navigation and command flags. Debugging Technique 1: Real-Time Inspection When Claude Code is running a task, it often hides the raw data exchange behind a progress bar. However, visibility is your best friend when an agent seems "stuck" or slow. The Expand Command While the agent is working, use the following shortcut to see exactly what is happening under the hood: - **`Ctrl + O`**: This expands the current tool output. - **`Ctrl + E`**: This allows you to browse earlier messages in the session history. By expanding the output, you can inspect the raw JSON returned by an MCP tool. In one instance, a database schema tool meant to fetch tables for a single Laravel project was actually returning every table from the entire local MySQL server—150 tables instead of the expected 10. This visibility immediately identifies the source of token bloat. Debugging Technique 2: Prompt-Based Analysis You can actually instruct the AI to perform self-monitoring. By appending specific instructions to your prompt, you force the model to report its own resource usage. ```text [Your Task Description Here] When done, list all MCP tools used and their specific token counts. ``` This creates a post-execution report where the agent analyzes its own logs. It provides an estimated token usage per tool call, making it easy to spot "heavy" calls. For example, a single database schema fetch might consume 10,000 tokens (5% of a 200k context window), which is a clear signal that the tool needs better filtering or scoped queries. Syntax and Tips When writing custom MCP tools or using external ones like those in GitHub repositories, always implement filters. If a tool fetches a database schema, it should accept a `tables` filter to limit scope. **Best Practices:** - **Verify Scoping**: Ensure the tool only accesses the current project's environment variables. - **Monitor Tokens**: Keep an eye on the 200k context limit; excessive MCP noise will cause the agent to "forget" earlier instructions. - **Contribute Back**: If you find a bug in an open-source MCP like Laravel Boost, document the JSON output and submit a pull request.
Jan 27, 2026The 30-Minute Multiplayer Challenge We often hear bold claims about AI-assisted coding, but moving from a "Hello World" snippet to a functional, real-time multiplayer application is a different beast entirely. This review examines a recent experiment where Claude Code was tasked with building "Laravel Universe," a quiz game featuring real-time websocket interaction and AI-generated voiceovers. The goal was simple: provide a high-level prompt and let the agent handle the heavy lifting, including database migrations, front-end animations, and real-time broadcasting using Laravel Reverb. Key Elements of the Stack The development workflow hinged on a powerful trifecta: Laravel as the backbone, Claude Code (utilizing Opus 4.5) as the agent, and Laravel Boost. The latter is a critical inclusion here; it provides a Model Context Protocol (MCP) server that feeds the AI specific documentation and database schemas. This contextual awareness bridged the gap between a generic LLM and a specialized developer. To round out the features, ElevenLabs was integrated to provide text-to-speech capabilities, allowing the quiz questions to be read in a cloned voice. Analysis: The Strengths and Stumbles The speed of initial scaffolding is undeniable. Within roughly nine minutes, the AI generated a themed landing page with orbiting planets and a functional registration system. Using the `dangerously-skip-permissions` flag allowed the agent to iterate without constant human approval, which is a massive productivity gain if you trust the underlying model. However, the "one-shot" dream still has cracks. The first iteration suffered from a logic bug that immediately skipped the first question. Additionally, while the UI was playful, the CSS positioning for the planets lacked precision, and some buttons failed to function. The fix for the question-skipping bug took another three minutes of iteration. It’s clear that while the AI handles Laravel's conventions brilliantly, it still requires a human "pilot" to catch edge cases and polish the user experience. Real-Time Performance and Integration The most impressive feat was the seamless integration of Laravel Reverb. The AI correctly identified Reverb as the optimal choice for websockets within the ecosystem without being explicitly told to use it. This demonstrates the power of "convention over configuration" when paired with AI; because Laravel has a standardized way of doing things, the AI doesn't have to guess. The multiplayer test, featuring multiple users moving rockets across the screen simultaneously, proved that AI can build complex event-driven architectures in minutes rather than hours. Final Verdict Claude Code and Laravel represent a formidable pairing. For developers, this isn't about replacing the craft; it's about accelerating the boring parts. The experiment successfully moved from concept to a live deployment on Laravel Cloud in under half an hour. If you are comfortable debugging AI-generated logic and focusing on architectural oversight, this workflow is a glimpse into the future of rapid prototyping.
Jan 20, 2026