Skip to content

Volt guidelines are incorrectly parsed #326

@jarrodldavis

Description

@jarrodldavis

Laravel Package Version

1.6.0

Laravel Version

12.36.1

PHP Version

8.4.14

System Info

macOS 15.6.1 (M2 Max) with Herd

Description

The @volt directives in .ai/volt/core.blade.php are being executed, resulting in garbled guidelines instead of using the literal text @volt, despite the use of @verbatim.

Steps To Reproduce

This issue can be seen by searching GitHub.

You can reproduce the issue by setting up a new Laravel 12.x application with Livewire and Volt (I used Laravel Herd's Create New Site UI), then installing Boost. Using laravel new directly:

$ laravel new site --livewire --boost --no-interaction
$ cd site
$ php artisan boost:install
# select an agent to generate guidelines (e.g., GitHub Copilot)
$ cat .github/copilot-instructions.md

In the guidelines, the Volt section is garbled:

=== volt/core rules ===

## Livewire Volt

- This project uses Livewire Volt for interactivity within its pages. New pages requiring interactivity must also use Livewire Volt. There is documentation available for it.
- Make new Volt components using `php artisan make:volt [name] [--test] [--pest]`
- Volt is a **class-based** and **functional** API for Livewire that supports single-file components, allowing a component's PHP logic and Blade templates to co-exist in the same file
- Livewire Volt allows PHP logic and Blade templates in one file. Components use the `@livewire("volt-anonymous-fragment-eyJuYW1lIjoidm9sdC1hbm9ueW1vdXMtZnJhZ21lbnQtYmQ5YWJiNTE3YWMyMTgwOTA1ZmUxMzAxODk0MGJiZmIiLCJwYXRoIjoic3RvcmFnZVwvZnJhbWV3b3JrXC92aWV3c1wvMTUxYWRjZWRjMzBhMzllOWIxNzQ0ZDRiMWRjY2FjYWIuYmxhZGUucGhwIn0=", Livewire\Volt\Precompilers\ExtractFragments::componentArguments([...get_defined_vars(), ...array (
)]))
</code-snippet>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions