This is a template package for Eclipse Filament plugins/packages. It serves as a base to develop new plugins with our tech stack, tools and documented implementation decisions and conventions. All plugins developed by DataLinx should use this package as a base by creating the new package and use...
php artisan boost:add-skill eclipsephp/plugin-template
Save this content to: AGENTS.md
<laravel-boost-guidelines>
=== .ai/10-project-specifics rules ===
# About the package
This is a template package for Eclipse Filament plugins/packages. It serves as a base to develop new plugins with our
tech stack, tools and documented implementation decisions and conventions.
All plugins developed by DataLinx should use this package as a base by creating the new package and use this package as
a template.
Even though it is a template, it is a fully functional plugin and serves as a working example of a DataLinx Eclipse
Filament plugin.
To test the plugin, the contained workbench app is used. This is made possible by Lando, which is already configured and
ready to use by simply running `lando start` in the package root.
Also, read and take into account the [README.md](README.md) file for project-specific documentation.
=== .ai/20-common-ai-guidelines rules ===
# Common AI Instructions for Eclipse PHP packages
This section contains common instructions for AI systems working on Eclipse PHP packages. It is intended to be included
by Laravel Boost to create AI agent-focused documentation (e.g the `AGENTS.md` file).
This lowers the maintenance burden and keeps the instructions consistent across packages.
All paths and commands in this file are relative to the root of the package.
Any preceding or following documentation referring to running commands and tests, coding guidelines, environment setup,
and other technical details should be adapted by taking these common guidelines into account.
## Project setup
- Source code lives in `src/`
- Tests live in `tests/`
- Workbench (testing) application lives in `workbench/`
- Package testbench configuration is in `testbench.yaml`
## Technology Stack
- PHP 8.3+
- Filament
- Orchestra Testbench
- Pest / PHPUnit
- Composer
- Laravel Pint
- Lando / Docker for development
## Commands
Because the application in development runs in a Docker container, using Lando as a wrapper, use the Lando commands
to run commands inside the container.
### Run a PHP command
```shell
lando php <command>
```
### Run a composer command
```shell
lando composer <command>
```
### Run an artisan command
To run a command against the workbench application, use the `testbench` command instead of `artisan`:
```shell
lando testbench <command>
```
E.g.
```shell
lando testbench migrate
```
## Coding Standards
- Follow Laravel conventions.
- Follow PSR-12 style.
- Use Laravel Pint for formatting.
- Prefer typed properties, return types, and constructor property promotion where appropriate.
- Keep classes small and focused.
- Use clear, descriptive names.
- Avoid unnecessary abstractions.
- Do not introduce dependencies unless they are clearly justified.
### Running the Linter (Laravel Pint)
```shell
lando format
```
To pass parameters to the internal tool, use double dash before the parameters:
```shell
lando format -- <parameters>
```
E.g.
```shell
lando format -- --dirty
```
Before considering a task complete, run:
```shell
lando format
lando test
```
## PHP Guidelines
- Use PHP 8.3-compatible syntax only.
- Prefer strict, readable code over clever code.
- Use enums where they improve clarity.
- Use Laravel collections only when they make the code easier to read.
- Prefer dependency injection over facades when practical.
- Avoid global helpers unless they already exist in the project and are appropriate.
## Laravel Package Guidelines
- Keep package code inside `src/`.
- Use the namespace defined in `composer.json` for package classes.
- Register package services through the package service provider.
- Keep workbench-only code inside `workbench/`.
- Do not place application-specific logic in package source code.
- Avoid publishing config, migrations, or assets unless required by the package behavior.
## Testing Guidelines
- Use Pest for new tests unless an existing nearby test uses PHPUnit style.
- Place feature tests in `tests/Feature`.
- Place unit tests in `tests/Unit`.
- Place testing support classes in `tests/Support`.
- Use Orchestra Testbench patterns for package tests.
- Prefer testing public behavior rather than private implementation details.
- Add or update tests when changing behavior.
### Running Tests
To run all tests:
```shell
lando test
```
To run specific tests or to pass parameters to Pest:
```shell
lando test -- <parameters>
```
E.g.:
```shell
lando test -- --filter=ArchTest
```
If running the full test suite is too expensive, run the most relevant test file and explain what was run.
## Documentation
- Update `README.md` when changing public package behavior.
- Update examples when APIs change.
- Keep documentation concise and practical.
- Do not update the `CHANGELOG.md` file — it is automatically updated by a GitHub Action.
## AI Behavior Rules
When working in this repository:
1. Inspect existing nearby code before proposing changes.
2. Preserve existing project structure and naming conventions.
3. Prefer small, incremental changes.
4. Do not rewrite files unnecessarily.
5. Do not add new packages without asking.
6. Do not change public APIs without explaining the impact.
7. Include tests for behavior changes.
8. Mention any commands that should be run to verify the change.
## Filament
### Tables
All Filament resource tables should use the `toggleable()`, `searchable()` and `sortable()` methods for all columns.
=== boost rules ===
# Laravel Boost
## Tools
- Laravel Boost is an MCP server with tools designed specifically for this application. Prefer Boost tools over manual alternatives like shell commands or file reads.
- Use `database-query` to run read-only queries against the database instead of writing raw SQL in tinker.
- Use `database-schema` to inspect table structure before writing migrations or models.
- Use `get-absolute-url` to resolve the correct scheme, domain, and port for project URLs. Always use this before sharing a URL with the user.
- Use `browser-logs` to read browser logs, errors, and exceptions. Only recent logs are useful, ignore old entries.
## Searching Documentation (IMPORTANT)
- Use `search-docs` before changes that depend on Laravel ecosystem APIs, behavior, configuration, or version-specific syntax. Skip it for copy-only edits and other changes where package documentation is irrelevant. Reuse sufficient results already in context instead of searching again.
- Pass a `packages` array to scope results when you know which packages are relevant.
- Use multiple broad, topic-based queries: `['rate limiting', 'routing rate limiting', 'routing']`. Expect the most relevant results first.
- Do not add package names to queries because package info is already shared. Use `test resource table`, not `filament 4 test resource table`.
### Search Syntax
1. Use words for auto-stemmed AND logic: `rate limit` matches both "rate" AND "limit".
2. Use `"quoted phrases"` for exact position matching: `"infinite scroll"` requires adjacent words in order.
3. Combine words and phrases for mixed queries: `middleware "rate limit"`.
4. Use multiple queries for OR logic: `queries=["authentication", "middleware"]`.
## Project Rules
- This project contains committed, area-grouped rules in `.ai/rules` when that directory exists, including path-scoped framework guidelines under `.ai/rules/boost`. Before you enter plan mode or create/edit any file, you MUST first: open @.ai/rules/index.md (it maps file globs to rule files), read every rule file whose globs cover the path(s) in scope, and run `grep -rin 'keyword' .ai/rules` to catch what a path match alone misses. Do not write code until you have read and are following every matching rule. If `.ai/rules` does not exist, continue without it.
## Artisan
- Run Artisan commands directly via the command line (e.g., `php artisan route:list`). Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters.
- Inspect routes with `php artisan route:list`. Filter with: `--method=GET`, `--name=users`, `--path=api`, `--except-vendor`, `--only-vendor`.
- Read configuration values using dot notation: `php artisan config:show app.name`, `php artisan config:show database.default`. Or read config files directly from the `config/` directory.
## Tinker
- Execute PHP in app context for debugging and testing code. Do not create models without user approval, prefer tests with factories instead. Prefer existing Artisan commands over custom tinker code.
- Always use single quotes to prevent shell expansion: `php artisan tinker --execute 'Your::code();'`
- Double quotes for PHP strings inside: `php artisan tinker --execute 'User::where("active", true)->count();'`
=== php rules ===
# PHP
- Always use curly braces for control structures, even for single-line bodies.
- Use PHP 8 constructor property promotion: `public function __construct(public GitHub $github) { }`. Do not leave empty zero-parameter `__construct()` methods unless the constructor is private.
- Use explicit return type declarations and type hints for all method parameters: `function isAccessible(User $user, ?string $path = null): bool`
- Use TitleCase for Enum keys: `FavoritePerson`, `BestLake`, `Monthly`.
- Prefer PHPDoc blocks over inline comments. Only add inline comments for exceptionally complex logic.
- Use array shape type definitions in PHPDoc blocks.
=== deployments rules ===
# Deployment
- Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications.
=== laravel/core rules ===
# Do Things the Laravel Way
- Use `php artisan make:` commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using `php artisan list` and check their parameters with `php artisan [command] --help`.
- If you're creating a generic PHP class, use `php artisan make:class`.
- Pass `--no-interaction` to all Artisan commands to ensure they work without user input. You should also pass the correct `--options` to ensure correct behavior.
### Model Creation
- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using `php artisan make:model --help` to check the available options.
## APIs & Eloquent Resources
- For APIs, default to using Eloquent API Resources and API versioning unless existing API routes do not, then you should follow existing application convention.
## URL Generation
- When generating links to other pages, prefer named routes and the `route()` function.
## Testing
- When creating models for tests, use the factories for the models. Check if the factory has custom states that can be used before manually setting up the model.
- Faker: Use methods such as `$this->faker->word()` or `fake()->randomDigit()`. Follow existing conventions whether to use `$this->faker` or `fake()`.
- When creating tests, make use of `php artisan make:test [options] {name}` to create a feature test, and pass `--unit` to create a unit test. Most tests should be feature tests.
=== laravel/v12 rules ===
# Laravel 12
- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples.
- This project uses the streamlined Laravel 11+ structure: register middleware, exceptions, and routing in `bootstrap/app.php` and service providers in `bootstrap/providers.php`. There is no `src/Http/Kernel.php` or `src/Console/Kernel.php`, and commands in `src/Console/Commands/` auto-register.
## Database
- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
### Models
- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models.
=== pint/core rules ===
# Laravel Pint Code Formatter
- If you have modified any PHP files, you must run `vendor/bin/pint --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style.
- Do not run `vendor/bin/pint --test --format agent`, simply run `vendor/bin/pint --format agent` to fix any formatting issues.
=== pest/core rules ===
# Pest
- This project uses Pest. Create tests with `php artisan make:test --pest {name}`.
- Do not include the test suite directory in `{name}`. Use `SomeFeatureTest`, not `Feature/SomeFeatureTest`.
- Read the `testing-best-practices` skill for guidance on coverage, naming, structure, dependency isolation, and review.
- Do not delete tests or test files without approval. They are part of the application.
## Running Tests
- Run the narrowest set of tests that covers the change. Pass a file path or `--filter=testName` to `php artisan test --compact`.
- Rerun a test after each change to it.
- Run `vendor/bin/pest` to call the test runner directly. It accepts the same file path and `--filter=testName` arguments.
- After the feature tests pass, ask the user to run the complete suite with `php artisan test --compact`.
</laravel-boost-guidelines>
This is a template package for Eclipse Filament plugins/packages. It serves as a base to develop new plugins with our
tech stack, tools and documented implementation decisions and conventions.
All plugins developed by DataLinx should use this package as a base by creating the new package and use this package as
a template.
Even though it is a template, it is a fully functional plugin and serves as a working example of a DataLinx Eclipse
Filament plugin.
To test the plugin, the contained workbench app is used. This is made possible by Lando, which is already configured and
ready to use by simply running lando start in the package root.
Also, read and take into account the README.md file for project-specific documentation.
=== .ai/20-common-ai-guidelines rules ===
This section contains common instructions for AI systems working on Eclipse PHP packages. It is intended to be included
by Laravel Boost to create AI agent-focused documentation (e.g the AGENTS.md file).
This lowers the maintenance burden and keeps the instructions consistent across packages.
All paths and commands in this file are relative to the root of the package.
Any preceding or following documentation referring to running commands and tests, coding guidelines, environment setup,
and other technical details should be adapted by taking these common guidelines into account.
src/tests/workbench/testbench.yamlBecause the application in development runs in a Docker container, using Lando as a wrapper, use the Lando commands to run commands inside the container.
lando php <command>
lando composer <command>
To run a command against the workbench application, use the testbench command instead of artisan:
lando testbench <command>
E.g.
lando testbench migrate
lando format
To pass parameters to the internal tool, use double dash before the parameters:
lando format -- <parameters>
E.g.
lando format -- --dirty
Before considering a task complete, run:
lando format
lando test
src/.composer.json for package classes.workbench/.tests/Feature.tests/Unit.tests/Support.To run all tests:
lando test
To run specific tests or to pass parameters to Pest:
lando test -- <parameters>
E.g.:
lando test -- --filter=ArchTest
If running the full test suite is too expensive, run the most relevant test file and explain what was run.
README.md when changing public package behavior.CHANGELOG.md file — it is automatically updated by a GitHub Action.When working in this repository:
All Filament resource tables should use the toggleable(), searchable() and sortable() methods for all columns.
=== boost rules ===
database-query to run read-only queries against the database instead of writing raw SQL in tinker.database-schema to inspect table structure before writing migrations or models.get-absolute-url to resolve the correct scheme, domain, and port for project URLs. Always use this before sharing a URL with the user.browser-logs to read browser logs, errors, and exceptions. Only recent logs are useful, ignore old entries.search-docs before changes that depend on Laravel ecosystem APIs, behavior, configuration, or version-specific syntax. Skip it for copy-only edits and other changes where package documentation is irrelevant. Reuse sufficient results already in context instead of searching again.packages array to scope results when you know which packages are relevant.['rate limiting', 'routing rate limiting', 'routing']. Expect the most relevant results first.test resource table, not filament 4 test resource table.rate limit matches both "rate" AND "limit"."quoted phrases" for exact position matching: "infinite scroll" requires adjacent words in order.middleware "rate limit".queries=["authentication", "middleware"]..ai/rules when that directory exists, including path-scoped framework guidelines under .ai/rules/boost. Before you enter plan mode or create/edit any file, you MUST first: open @.ai/rules/index.md (it maps file globs to rule files), read every rule file whose globs cover the path(s) in scope, and run grep -rin 'keyword' .ai/rules to catch what a path match alone misses. Do not write code until you have read and are following every matching rule. If .ai/rules does not exist, continue without it.php artisan route:list). Use php artisan list to discover available commands and php artisan [command] --help to check parameters.php artisan route:list. Filter with: --method=GET, --name=users, --path=api, --except-vendor, --only-vendor.php artisan config:show app.name, php artisan config:show database.default. Or read config files directly from the config/ directory.php artisan tinker --execute 'Your::code();'
php artisan tinker --execute 'User::where("active", true)->count();'=== php rules ===
public function __construct(public GitHub $github) { }. Do not leave empty zero-parameter __construct() methods unless the constructor is private.function isAccessible(User $user, ?string $path = null): boolFavoritePerson, BestLake, Monthly.=== deployments rules ===
=== laravel/core rules ===
php artisan make: commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using php artisan list and check their parameters with php artisan [command] --help.php artisan make:class.--no-interaction to all Artisan commands to ensure they work without user input. You should also pass the correct --options to ensure correct behavior.php artisan make:model --help to check the available options.route() function.$this->faker->word() or fake()->randomDigit(). Follow existing conventions whether to use $this->faker or fake().php artisan make:test [options] {name} to create a feature test, and pass --unit to create a unit test. Most tests should be feature tests.=== laravel/v12 rules ===
search-docs tool for version-specific Laravel documentation and updated code examples.bootstrap/app.php and service providers in bootstrap/providers.php. There is no src/Http/Kernel.php or src/Console/Kernel.php, and commands in src/Console/Commands/ auto-register.When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
Laravel 12 allows limiting eagerly loaded records natively, without external packages: $query->latest()->limit(10);.
casts() method on a model rather than the $casts property. Follow existing conventions from other models.=== pint/core rules ===
vendor/bin/pint --dirty --format agent before finalizing changes to ensure your code matches the project's expected style.vendor/bin/pint --test --format agent, simply run vendor/bin/pint --format agent to fix any formatting issues.=== pest/core rules ===
php artisan make:test --pest {name}.{name}. Use SomeFeatureTest, not Feature/SomeFeatureTest.testing-best-practices skill for guidance on coverage, naming, structure, dependency isolation, and review.--filter=testName to php artisan test --compact.vendor/bin/pest to call the test runner directly. It accepts the same file path and --filter=testName arguments.php artisan test --compact.How can I help you explore Laravel packages today?