Skip to content

Error when Custom AI Guideline contains Blade @if directive #104

@kamilkozak

Description

@kamilkozak

Laravel Package Version

1.0.9

Laravel Version

12.24.0

PHP Version

8.4.10

System Info

macOS 15.6

Description

When I add a guideline file to .ai/guidelines/* containing a Blade example with @if, for example:

- Indent with 4 spaces
- No spaces after control structures:
  ```blade
  @if($condition)
      Something
  @endif
  ```

and then run:

php artisan boost:install

I get the following error:

Illuminate\View\ViewException
Undefined variable $condition

Expected behavior:
The Blade snippet inside the guideline should be treated as a code example and not executed/evaluated by Laravel.

Steps To Reproduce

  1. Create .ai/guidelines/example.blade.php with the above Blade snippet.
  2. Run php artisan boost:install.
  3. Observe the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions