Skip to content

Conversation

@pushpak1300
Copy link
Member

This update introduces first class Sail support across the guidelines.
When a project installs Boost with Sail enabled, agent instructions now automatically switch to Sail specific commands rather than native CLI commands.

Example guidelines

Before
- Run the minimum number of tests needed. Use php artisan test with a filename or filter.

After (Sail selected during boost:install)
- Run the minimum number of tests needed. Use vendor/bin/sail artisan test with a filename or filter.

Alongside these dynamic command replacements, this MR adds dedicated Sail usage guidance so LLM agents can reliably work inside Sail environments.

## Laravel Sail

- This project runs inside Laravel Sail's Docker containers. You must run commands through Sail.
- Start services with `vendor/bin/sail up -d` and stop them using `vendor/bin/sail stop`.
- Open the app in a browser with `vendor/bin/sail open`.
- Prefix PHP, Artisan, Composer and Node commands with `vendor/bin/sail`. For example:
  - `vendor/bin/sail artisan migrate`
  - `vendor/bin/sail composer install`
  - `vendor/bin/sail npm run dev`
  - `vendor/bin/sail php script.php`
- View all Sail commands by running `vendor/bin/sail` with no arguments.

Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
@pushpak1300 pushpak1300 marked this pull request as draft November 4, 2025 13:44
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
@pushpak1300 pushpak1300 marked this pull request as ready for review November 4, 2025 17:16
pushpak1300 and others added 4 commits November 4, 2025 22:46
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>

# Conflicts:
#	all.php
#	src/Console/InstallCommand.php
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>

- You must run `vendor/bin/pint --dirty` before finalizing changes to ensure your code matches the project's expected style.
- Do not run `vendor/bin/pint --test`, simply run `vendor/bin/pint` to fix any formatting issues.
- You must run `{{ $assist->bin() }}pint --dirty` before finalizing changes to ensure your code matches the project's expected style.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, I feel like this would be written as {{ $assist->bin() }}/pint --dirty, so that $assist->bin() would return the path without the trailing slash for clarity. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have refactored this to use $assist->binCommand('pint') which feels much cleaner to me overall let me know what do you think.


public bool $laravelStyle = false;

public bool $enforceSail = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is enforce the right term here? Feels off.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right enforce is too strict done refactoring from enforceSail -> usesSail

{
if ($this->shouldUseSail()) {
return ['laravel-boost', './vendor/bin/sail', 'artisan', 'boost:mcp'];
return ['laravel-boost', Sail::SAIL_BINARY_PATH, 'artisan', 'boost:mcp'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like all Sail related things should be encapsulated in Sail, right? So shouldn't this be (pseudo code): $sail->buildMcCommand()?

public function artisan(): string
{
return $this->config->enforceSail
? Sail::SAIL_BINARY_PATH.' artisan'
Copy link
Contributor

@joetannenbaum joetannenbaum Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, does it make more sense to have $sail->artisan()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m fine with either approach. My intent was to avoid over encapsulation and prevent Sail from being too closely tied to GuidelineAssist.php.

I’ve now refactored it to call the static methods from Sail instead. wdyt ?

Copy link
Contributor

@joetannenbaum joetannenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close, perhaps a bit more tweaking based on my comments. Let me know what you think.

pushpak1300 and others added 11 commits November 7, 2025 18:22
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants