Laravel Boost Project Rules: Teach AI Agents Your Conventions | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Laravel Boost Project Rules: Teach AI Agents Your Team's Conventions        On this page       1. [  What Are Laravel Boost Project Rules? ](#what-are-laravel-boost-project-rules)
2. [  What a Rule File Looks Like ](#what-a-rule-file-looks-like)
3. [  Recording Rules Without Writing Them by Hand ](#recording-rules-without-writing-them-by-hand)
4. [  Bootstrapping an Existing Application ](#bootstrapping-an-existing-application)
5. [  Why Scoped Rules Beat a Single Instructions File ](#why-scoped-rules-beat-a-single-instructions-file)
6. [  Getting Started ](#getting-started)
7. [  Key Takeaways ](#key-takeaways)

  ![Laravel Boost Project Rules: Teach AI Agents Your Team's Conventions](https://cdn.msaied.com/517/850c73bd5504aa6154c76e452ad136c1.png)

 [  Laravel ](https://msaied.com/articles?category=laravel) [  AI ](https://msaied.com/articles?category=ai)  #Laravel Boost   #AI Agents   #Laravel   #Developer Tooling   #MCP  

 Laravel Boost Project Rules: Teach AI Agents Your Team's Conventions 
======================================================================

     5 Aug 2026      4 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   What Are Laravel Boost Project Rules?  ](#what-are-laravel-boost-project-rules)
2. [  02   What a Rule File Looks Like  ](#what-a-rule-file-looks-like)
3. [  03   Recording Rules Without Writing Them by Hand  ](#recording-rules-without-writing-them-by-hand)
4. [  04   Bootstrapping an Existing Application  ](#bootstrapping-an-existing-application)
5. [  05   Why Scoped Rules Beat a Single Instructions File  ](#why-scoped-rules-beat-a-single-instructions-file)
6. [  06   Getting Started  ](#getting-started)
7. [  07   Key Takeaways  ](#key-takeaways)

 What Are Laravel Boost Project Rules?
-------------------------------------

Laravel Boost v2.5.0, released on August 4, 2026, ships project rules as a first-class feature. Rules are Markdown files stored in `.ai/rules` and committed to your repository. Each file carries a `paths:` frontmatter key listing the glob patterns it covers, so an agent reads a rule only when it is about to work on a matching path.

The feature was built by [Pushpak Chhajed](https://github.com/pushpak1300) in [pull request #852](https://github.com/laravel/boost/pull/852), shipped behind a flag in Boost v2.4.12, and is enabled by default from v2.5.0 onward.

What a Rule File Looks Like
---------------------------

A rule file is plain Markdown with a small YAML frontmatter block:

```markdown
---
paths:
  - app/Jobs/**
---

# Jobs

## Reporting jobs run on the reports connection

Any job that reads from the reporting tables must set `$connection = 'reports'`.
The default connection shares its workers with checkout, so one slow report will
hold up every order behind it in the queue.

```

Boost maintains an `.ai/rules/index.md` that maps globs to rule files. Agents are instructed to check this index before planning or editing anything, which keeps irrelevant rules out of context entirely.

```markdown
# Project Rules Index

| Applies to            | Rule file                    |
| --------------------- | ---------------------------- |
| app/Jobs/**           | .ai/rules/jobs.md            |
| database/migrations/** | .ai/rules/migrations.md     |

```

Because the `.ai/rules` directory is committed to version control, rules are reviewed in pull requests and apply to every agent any team member points at the codebase — not just the developer who wrote them.

Recording Rules Without Writing Them by Hand
--------------------------------------------

You are not expected to author these files manually. Tell your agent to remember something, and it calls Boost's `record-rule` MCP tool with a glob, a title, and a note:

```sql
Remember that we never call Stripe from a controller. Billing always goes
through App\Billing\Gateway so the retries and logging stay in one place.

```

Boost determines which rule file the note belongs in, creates it if it does not exist, and rebuilds `index.md`. Rebuilding the index is critical — agents discover rules through `index.md`, so any file dropped into `.ai/rules` manually will go unread until the index is regenerated.

Bootstrapping an Existing Application
-------------------------------------

For applications already in production, Boost v2.5.0 adds an `infer-conventions` skill. Ask your agent to run it, and it audits your validation, controllers, authorisation, models, architecture, testing, frontend, database, and console code, then does an open-ended pass for base classes, shared traits, and module layouts.

The skill records what your code actually does, not what it should do. Framework defaults are skipped, Pint and Rector concerns are excluded, and genuinely mixed patterns are flagged for your review rather than recorded as conventions. Every finding includes supporting evidence for you to approve before it becomes a rule.

Why Scoped Rules Beat a Single Instructions File
------------------------------------------------

A monolithic `CLAUDE.md` or `AGENTS.md` grows quickly. Six months in it can be five pages long, and all of it loads at the start of every session regardless of what you are working on. Scoped rules solve this: the agent checks the index, finds only the rows matching the current file path, and reads those. It is the same idea behind Boost skills, applied to your own codebase conventions instead of the framework's.

Getting Started
---------------

If Boost is already installed, one command brings everything up to date:

```bash
php artisan boost:update

```

This regenerates your `CLAUDE.md` or `AGENTS.md` with the instructions that point agents to `.ai/rules/index.md`, and installs the `infer-conventions` skill. To disable the feature entirely, set `BOOST_RULES_ENABLED=false` in your environment.

Key Takeaways
-------------

- Project rules live in `.ai/rules` as committed Markdown files with `paths:` frontmatter.
- An `index.md` file maps globs to rule files; agents check it before every edit.
- The `record-rule` MCP tool creates and indexes rules from a plain-language prompt.
- The `infer-conventions` skill audits an existing codebase and proposes rules for approval.
- Rules are version-controlled and team-wide, unlike an agent's local memory.
- Run `php artisan boost:update` to enable the feature on an existing Boost installation.

---

*Source: [Laravel Boost Project Rules: Teach Agents Your Conventions — Laravel News](https://laravel-news.com/laravel-boost-project-rules)*

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-boost-project-rules-teach-ai-agents-your-teams-conventions&text=Laravel+Boost+Project+Rules%3A+Teach+AI+Agents+Your+Team%27s+Conventions) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-boost-project-rules-teach-ai-agents-your-teams-conventions) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  How do Laravel Boost project rules differ from a CLAUDE.md or AGENTS.md file?        A single CLAUDE.md or AGENTS.md loads its entire contents at the start of every agent session, regardless of what files are being edited. Boost project rules are scoped to directory globs and stored in separate Markdown files under .ai/rules. An agent checks the index.md file, identifies only the rules matching the current file path, and reads those — keeping unrelated conventions out of context. 

      Q02  Do I need to write rule files manually?        No. You can tell your agent to remember something in plain language, and it calls Boost's record-rule MCP tool to create or update the appropriate rule file and rebuild the index automatically. For existing codebases, the infer-conventions skill audits your code and proposes rules based on patterns it finds, which you approve before they are committed. 

      Q03  How do I enable Laravel Boost project rules on an existing installation?        Run php artisan boost:update. This regenerates your CLAUDE.md or AGENTS.md with the instructions that direct agents to .ai/rules/index.md and installs the infer-conventions skill. Rules are on by default from Boost v2.5.0 onward. Set BOOST_RULES_ENABLED=false to disable them. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Job Batching, Chaining, and Rate-Limited Middleware in Laravel Queues](https://cdn.msaied.com/515/f0ef4270f8cb79ceff107c7a7c63f1ed.png) laravel queues jobs 

### Job Batching, Chaining, and Rate-Limited Middleware in Laravel Queues

Go beyond basic dispatching: learn how to compose Laravel job batches, build resilient chains, and throttle th...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 6 Aug 2026     3 min read  

  Read    

 ](https://msaied.com/articles/job-batching-chaining-and-rate-limited-middleware-in-laravel-queues-4) [ ![Extract an Image's Dominant Color in Laravel 13.24](https://cdn.msaied.com/516/850cdb7ffa533b75462e7b29e8b25eb4.png) Laravel Image Processing PHP 

### Extract an Image's Dominant Color in Laravel 13.24

Laravel 13.24 added dominantColor() to the first-party image API. Learn how to extract, store, and use an imag...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 5 Aug 2026     3 min read  

  Read    

 ](https://msaied.com/articles/extract-an-images-dominant-color-in-laravel-1324) [ ![Image Dominant Color and HEIC Support in Laravel 13.24](https://cdn.msaied.com/514/1db4d7a38103ef4be23345bd39fc7658.png) Laravel 13.24 Image API HEIC 

### Image Dominant Color and HEIC Support in Laravel 13.24

Laravel 13.24 adds dominant color detection, HEIC/AVIF image support, a modelKeys() query builder method, a ne...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 4 Aug 2026     4 min read  

  Read    

 ](https://msaied.com/articles/image-dominant-color-and-heic-support-in-laravel-1324) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
