feat: guidelines: add Inertia form guidelines #211
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What & Why
Inertia released a new
<Form>
component which makes building forms a lot easier. We want Boost to help AI/users make use of this component, when it's available.Core
<Form>
is, and existing project conventionsExtra
Inertia
GuidelineAssist class to conditionally include guidelines@boostsnippet
directive to simplify adding verbatim code snippets without accidentally running PHP code or Vue{{ errors.name }}
code being ranHow I tested
Building a feature
composer.json
boost:install
, checked the resulting guidelinesPrompt example:
Manually reading
php all.php > all.md; open all.md
to read through all guidelines./artisan boost:install; less CLAUDE.md
to read through guidelines for this specific test projectNotes/thoughts
.ai/inertia-laravel/2/core.blade.php
), but when we want indented lists it's problematic. Have to revisit this.@if(hasForms()) @include('.forms-with-component.blade.php') @else @include('.forms-without-component.blade.php')
? Then we can keep the guidelines separately managed, and instead conditionally include the entire file.<Form>
is in use, then we can strengthen the language and exclude theuseForm
part, but that's extra tricky for v1, I think that's a v2 thing.<Form>
yet, so we can't enforce that usage bringing their codebase out of alignment.Demo
CleanShot.2025-08-27.at.15.18.26.mp4