Skip to content

A free open source IT asset/license management system

Re-commit generated boost rules

Marcus Moore9e335d0ebe2e
diff --git a/.ai/rules/boost/http-routes.md b/.ai/rules/boost/http-routes.md
new file mode 100644
index 0000000000..c52c4a6be0
--- /dev/null
+++ b/.ai/rules/boost/http-routes.md
@@ -0,0 +1,9 @@
+---
+paths:
+ - 'app/Http/**'
+ - 'routes/**'
+---
+
+## 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.
diff --git a/.ai/rules/boost/livewire-views.md b/.ai/rules/boost/livewire-views.md
new file mode 100644
index 0000000000..3c7da70a6b
--- /dev/null
+++ b/.ai/rules/boost/livewire-views.md
@@ -0,0 +1,11 @@
+---
+paths:
+ - 'app/Livewire/**'
+ - 'resources/views/**'
+---
+
+# Livewire
+
+- Livewire allow to build dynamic, reactive interfaces in PHP without writing JavaScript.
+- You can use Alpine.js for client-side interactions instead of JavaScript frameworks.
+- Keep state server-side so the UI reflects it. Validate and authorize in actions as you would in HTTP requests.
diff --git a/.ai/rules/boost/migrations.md b/.ai/rules/boost/migrations.md
new file mode 100644
index 0000000000..7465749584
--- /dev/null
+++ b/.ai/rules/boost/migrations.md
@@ -0,0 +1,8 @@
+---
+paths:
+ - 'database/migrations/**'
+---
+
+## 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.
diff --git a/.ai/rules/boost/models-migrations.md b/.ai/rules/boost/models-migrations.md
new file mode 100644
index 0000000000..56f864d529
--- /dev/null
+++ b/.ai/rules/boost/models-migrations.md
@@ -0,0 +1,13 @@
+---
+paths:
+ - 'app/Models/**'
+ - 'database/migrations/**'
+---
+
+# Models Migrations
+
+- 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.
diff --git a/.ai/rules/boost/models.md b/.ai/rules/boost/models.md
new file mode 100644
index 0000000000..304063354a
--- /dev/null
+++ b/.ai/rules/boost/models.md
@@ -0,0 +1,8 @@
+---
+paths:
+ - 'app/Models/**'
+---
+
+### 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.
diff --git a/.ai/rules/boost/tests.md b/.ai/rules/boost/tests.md
new file mode 100644
index 0000000000..4a97a6852c
--- /dev/null
+++ b/.ai/rules/boost/tests.md
@@ -0,0 +1,26 @@
+---
+paths:
+ - 'tests/**'
+---
+
+## 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.
+
+# PHPUnit
+
+- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit {name}` to create a new test.
+- If you see a test using "Pest", convert it to PHPUnit.
+- Every time a test has been updated, run that singular test.
+- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing.
+- Tests should cover all happy paths, failure paths, and edge cases.
+- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application.
+
+## Running Tests
+
+- Run the minimal number of tests, using an appropriate filter, before finalizing.
+- To run all tests: `php artisan test --compact`.
+- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`.
+- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file).
diff --git a/.gitignore b/.gitignore
index 0da2cd7988..04705a850f 100755
--- a/.gitignore
+++ b/.gitignore
@@ -77,7 +77,6 @@ storage/ldap_client_tls.key
/.phpunit.cache
-/.ai/rules/boost
/.mcp.json
/.agents
/.amp