Skip to content

Commit 85578d2

Browse files
committed
wip
1 parent c76aa81 commit 85578d2

File tree

3 files changed

+332
-333
lines changed

3 files changed

+332
-333
lines changed

.ai/mcp/mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"laravel-boost": {
4+
"command": "/opt/homebrew/Cellar/php/8.4.10/bin/php",
5+
"args": [
6+
"/Users/dennissmink/Workspace/roadmap/artisan",
7+
"boost:mcp"
8+
]
9+
}
10+
}
11+
}

.junie/guidelines.md

Lines changed: 56 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ This application is a Laravel application and its main Laravel ecosystems packag
2323
- tailwindcss (TAILWINDCSS) - v4
2424

2525
## Conventions
26-
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, naming.
26+
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, and naming.
2727
- Use descriptive names for variables and methods. For example, `isRegisteredForDiscounts`, not `discount()`.
2828
- Check for existing components to reuse before writing a new one.
2929

3030
## Verification Scripts
3131
- Do not create verification scripts or tinker when tests cover that functionality and prove it works. Unit and feature tests are more important.
3232

3333
## Application Structure & Architecture
34-
- Stick to existing directory structure - don't create new base folders without approval.
34+
- Stick to existing directory structure; don't create new base folders without approval.
3535
- Do not change the application's dependencies without approval.
3636

3737
## Frontend Bundling
@@ -43,17 +43,16 @@ This application is a Laravel application and its main Laravel ecosystems packag
4343
## Documentation Files
4444
- You must only create documentation files if explicitly requested by the user.
4545

46-
4746
=== boost rules ===
4847

4948
## Laravel Boost
5049
- Laravel Boost is an MCP server that comes with powerful tools designed specifically for this application. Use them.
5150

5251
## Artisan
53-
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double check the available parameters.
52+
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double-check the available parameters.
5453

5554
## URLs
56-
- Whenever you share a project URL with the user you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain / IP, and port.
55+
- Whenever you share a project URL with the user, you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain/IP, and port.
5756

5857
## Tinker / Debugging
5958
- You should use the `tinker` tool when you need to execute PHP to debug code or query Eloquent models directly.
@@ -64,22 +63,21 @@ This application is a Laravel application and its main Laravel ecosystems packag
6463
- Only recent browser logs will be useful - ignore old logs.
6564

6665
## Searching Documentation (Critically Important)
67-
- Boost comes with a powerful `search-docs` tool you should use before any other approaches. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation specific for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
68-
- The 'search-docs' tool is perfect for all Laravel related packages, including Laravel, Inertia, Livewire, Filament, Tailwind, Pest, Nova, Nightwatch, etc.
69-
- You must use this tool to search for Laravel-ecosystem documentation before falling back to other approaches.
66+
- Boost comes with a powerful `search-docs` tool you should use before any other approaches when dealing with Laravel or Laravel ecosystem packages. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
67+
- The `search-docs` tool is perfect for all Laravel-related packages, including Laravel, Inertia, Livewire, Filament, Tailwind, Pest, Nova, Nightwatch, etc.
68+
- You must use this tool to search for Laravel ecosystem documentation before falling back to other approaches.
7069
- Search the documentation before making code changes to ensure we are taking the correct approach.
71-
- Use multiple, broad, simple, topic based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
72-
- Do not add package names to queries - package information is already shared. For example, use `test resource table`, not `filament 4 test resource table`.
70+
- Use multiple, broad, simple, topic-based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
71+
- Do not add package names to queries; package information is already shared. For example, use `test resource table`, not `filament 4 test resource table`.
7372

7473
### Available Search Syntax
7574
- You can and should pass multiple queries at once. The most relevant results will be returned first.
7675

77-
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'
78-
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit"
79-
3. Quoted Phrases (Exact Position) - query="infinite scroll" - Words must be adjacent and in that order
80-
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit"
81-
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms
82-
76+
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'.
77+
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit".
78+
3. Quoted Phrases (Exact Position) - query="infinite scroll" - words must be adjacent and in that order.
79+
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit".
80+
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms.
8381

8482
=== php rules ===
8583

@@ -90,7 +88,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
9088
### Constructors
9189
- Use PHP 8 constructor property promotion in `__construct()`.
9290
- <code-snippet>public function __construct(public GitHub $github) { }</code-snippet>
93-
- Do not allow empty `__construct()` methods with zero parameters.
91+
- Do not allow empty `__construct()` methods with zero parameters unless the constructor is private.
9492

9593
### Type Declarations
9694
- Always use explicit return type declarations for methods and functions.
@@ -104,22 +102,20 @@ protected function isAccessible(User $user, ?string $path = null): bool
104102
</code-snippet>
105103

106104
## Comments
107-
- Prefer PHPDoc blocks over comments. Never use comments within the code itself unless there is something _very_ complex going on.
105+
- Prefer PHPDoc blocks over inline comments. Never use comments within the code itself unless there is something very complex going on.
108106

109107
## PHPDoc Blocks
110108
- Add useful array shape type definitions for arrays when appropriate.
111109

112110
## Enums
113111
- That being said, keys in an Enum should follow existing application Enum conventions.
114112

115-
116113
=== tests rules ===
117114

118115
## Test Enforcement
119116

120117
- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass.
121-
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.
122-
118+
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test --compact` with a specific filename or filter.
123119

124120
=== laravel/core rules ===
125121

@@ -131,7 +127,7 @@ protected function isAccessible(User $user, ?string $path = null): bool
131127

132128
### Database
133129
- Always use proper Eloquent relationship methods with return type hints. Prefer relationship methods over raw queries or manual joins.
134-
- Use Eloquent models and relationships before suggesting raw database queries
130+
- Use Eloquent models and relationships before suggesting raw database queries.
135131
- Avoid `DB::`; prefer `Model::query()`. Generate code that leverages Laravel's ORM capabilities rather than bypassing them.
136132
- Generate code that prevents N+1 query problems by using eager loading.
137133
- Use Laravel's query builder for very complex database operations.
@@ -166,14 +162,13 @@ protected function isAccessible(User $user, ?string $path = null): bool
166162
### Vite Error
167163
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `npm run build` or ask the user to run `npm run dev` or `composer run dev`.
168164

169-
170165
=== laravel/v12 rules ===
171166

172167
## Laravel 12
173168

174-
- Use the `search-docs` tool to get version specific documentation.
169+
- Use the `search-docs` tool to get version-specific documentation.
175170
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel file structure.
176-
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not to need migrate to the new Laravel structure unless the user explicitly requests that.
171+
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not need to migrate to the new Laravel structure unless the user explicitly requests it.
177172

178173
### Laravel 10 Structure
179174
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
@@ -185,19 +180,19 @@ protected function isAccessible(User $user, ?string $path = null): bool
185180

186181
### Database
187182
- 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.
188-
- Laravel 11 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
183+
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
189184

190185
### Models
191186
- 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.
192187

193-
194188
=== livewire/core rules ===
195189

196-
## Livewire Core
197-
- Use the `search-docs` tool to find exact version specific documentation for how to write Livewire & Livewire tests.
198-
- Use the `php artisan make:livewire [Posts\CreatePost]` artisan command to create new components
190+
## Livewire
191+
192+
- Use the `search-docs` tool to find exact version-specific documentation for how to write Livewire and Livewire tests.
193+
- Use the `php artisan make:livewire [Posts\CreatePost]` Artisan command to create new components.
199194
- State should live on the server, with the UI reflecting it.
200-
- All Livewire requests hit the Laravel backend, they're like regular HTTP requests. Always validate form data, and run authorization checks in Livewire actions.
195+
- All Livewire requests hit the Laravel backend; they're like regular HTTP requests. Always validate form data and run authorization checks in Livewire actions.
201196

202197
## Livewire Best Practices
203198
- Livewire components require a single root element.
@@ -214,15 +209,14 @@ protected function isAccessible(User $user, ?string $path = null): bool
214209
215210
- Prefer lifecycle hooks like `mount()`, `updatedFoo()` for initialization and reactive side effects:
216211
217-
<code-snippet name="Lifecycle hook examples" lang="php">
212+
<code-snippet name="Lifecycle Hook Examples" lang="php">
218213
public function mount(User $user) { $this->user = $user; }
219214
public function updatedSearch() { $this->resetPage(); }
220215
</code-snippet>
221216
222-
223217
## Testing Livewire
224218
225-
<code-snippet name="Example Livewire component test" lang="php">
219+
<code-snippet name="Example Livewire Component Test" lang="php">
226220
Livewire::test(Counter::class)
227221
->assertSet('count', 0)
228222
->call('increment')
@@ -231,19 +225,17 @@ protected function isAccessible(User $user, ?string $path = null): bool
231225
->assertStatus(200);
232226
</code-snippet>
233227
234-
235-
<code-snippet name="Testing a Livewire component exists within a page" lang="php">
236-
$this->get('/posts/create')
237-
->assertSeeLivewire(CreatePost::class);
238-
</code-snippet>
239-
228+
<code-snippet name="Testing Livewire Component Exists on Page" lang="php">
229+
$this->get('/posts/create')
230+
->assertSeeLivewire(CreatePost::class);
231+
</code-snippet>
240232
241233
=== livewire/v3 rules ===
242234
243235
## Livewire 3
244236
245237
### Key Changes From Livewire 2
246-
- These things changed in Livewire 2, but may not have been updated in this application. Verify this application's setup to ensure you conform with application conventions.
238+
- These things changed in Livewire 3, but may not have been updated in this application. Verify this application's setup to ensure you conform with application conventions.
247239
- Use `wire:model.live` for real-time updates, `wire:model` is now deferred by default.
248240
- Components now use the `App\Livewire` namespace (not `App\Http\Livewire`).
249241
- Use `$this->dispatch()` to dispatch events (not `emit` or `dispatchBrowserEvent`).
@@ -253,13 +245,13 @@ protected function isAccessible(User $user, ?string $path = null): bool
253245
- `wire:show`, `wire:transition`, `wire:cloak`, `wire:offline`, `wire:target` are available for use. Use the documentation to find usage examples.
254246
255247
### Alpine
256-
- Alpine is now included with Livewire, don't manually include Alpine.js.
248+
- Alpine is now included with Livewire; don't manually include Alpine.js.
257249
- Plugins included with Alpine: persist, intersect, collapse, and focus.
258250
259251
### Lifecycle Hooks
260252
- You can listen for `livewire:init` to hook into Livewire initialization, and `fail.status === 419` for the page expiring:
261253
262-
<code-snippet name="livewire:load example" lang="js">
254+
<code-snippet name="Livewire Init Hook Example" lang="js">
263255
document.addEventListener('livewire:init', function () {
264256
Livewire.hook('request', ({ fail }) => {
265257
if (fail && fail.status === 419) {
@@ -273,7 +265,6 @@ document.addEventListener('livewire:init', function () {
273265
});
274266
</code-snippet>
275267
276-
277268
=== pest/core rules ===
278269
279270
## Pest
@@ -294,9 +285,9 @@ it('is true', function () {
294285
295286
### Running Tests
296287
- Run the minimal number of tests using an appropriate filter before finalizing code edits.
297-
- To run all tests: `php artisan test`.
298-
- To run all tests in a file: `php artisan test tests/Feature/ExampleTest.php`.
299-
- To filter on a particular test name: `php artisan test --filter=testName` (recommended after making a change to a related file).
288+
- To run all tests: `php artisan test --compact`.
289+
- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`.
290+
- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file).
300291
- When the tests relating to your changes are passing, ask the user if they would like to run the entire test suite to ensure everything is still passing.
301292
302293
### Pest Assertions
@@ -315,7 +306,7 @@ it('returns all', function () {
315306
- You can also create partial mocks using the same import or self method.
316307
317308
### Datasets
318-
- Use datasets in Pest to simplify tests which have a lot of duplicated data. This is often the case when testing validation rules, so consider going with this solution when writing tests for validation rules.
309+
- Use datasets in Pest to simplify tests that have a lot of duplicated data. This is often the case when testing validation rules, so consider this solution when writing tests for validation rules.
319310
320311
<code-snippet name="Pest Dataset Example" lang="php">
321312
it('has emails', function (string $email) {
@@ -326,39 +317,37 @@ it('has emails', function (string $email) {
326317
]);
327318
</code-snippet>
328319
329-
330320
=== tailwindcss/core rules ===
331321
332-
## Tailwind Core
322+
## Tailwind CSS
333323
334-
- Use Tailwind CSS classes to style HTML, check and use existing tailwind conventions within the project before writing your own.
335-
- Offer to extract repeated patterns into components that match the project's conventions (i.e. Blade, JSX, Vue, etc..)
336-
- Think through class placement, order, priority, and defaults - remove redundant classes, add classes to parent or child carefully to limit repetition, group elements logically
324+
- Use Tailwind CSS classes to style HTML; check and use existing Tailwind conventions within the project before writing your own.
325+
- Offer to extract repeated patterns into components that match the project's conventions (i.e. Blade, JSX, Vue, etc.).
326+
- Think through class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child carefully to limit repetition, and group elements logically.
337327
- You can use the `search-docs` tool to get exact examples from the official documentation when needed.
338328
339329
### Spacing
340-
- When listing items, use gap utilities for spacing, don't use margins.
341-
342-
<code-snippet name="Valid Flex Gap Spacing Example" lang="html">
343-
<div class="flex gap-8">
344-
<div>Superior</div>
345-
<div>Michigan</div>
346-
<div>Erie</div>
347-
</div>
348-
</code-snippet>
349-
330+
- When listing items, use gap utilities for spacing; don't use margins.
331+
332+
<code-snippet name="Valid Flex Gap Spacing Example" lang="html">
333+
<div class="flex gap-8">
334+
<div>Superior</div>
335+
<div>Michigan</div>
336+
<div>Erie</div>
337+
</div>
338+
</code-snippet>
350339
351340
### Dark Mode
352341
- If existing pages and components support dark mode, new pages and components must support dark mode in a similar way, typically using `dark:`.
353342
354-
355343
=== tailwindcss/v4 rules ===
356344
357-
## Tailwind 4
345+
## Tailwind CSS 4
358346
359-
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
347+
- Always use Tailwind CSS v4; do not use the deprecated utilities.
360348
- `corePlugins` is not supported in Tailwind v4.
361349
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
350+
362351
<code-snippet name="Extending Theme in CSS" lang="css">
363352
@theme {
364353
--color-brand: oklch(0.72 0.11 178);
@@ -374,9 +363,8 @@ it('has emails', function (string $email) {
374363
+ @import "tailwindcss";
375364
</code-snippet>
376365
377-
378366
### Replaced Utilities
379-
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option - use the replacement.
367+
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option; use the replacement.
380368
- Opacity values are still numeric.
381369
382370
| Deprecated | Replacement |

0 commit comments

Comments
 (0)