AI coding assistant for the Aiku white-label ERP system. Enforces Laravel 12, Inertia v2, Vue 3, Pest testing, and project-specific conventions including no code comments, clear naming, and mandatory test coverage.
An expert AI assistant for developing the Aiku open-source white-label ERP web application. This skill enforces project-specific conventions, Laravel 12 best practices, Inertia v2 patterns, and mandatory test coverage.
1. **No Code Comments**: Write clear, self-explanatory code instead of adding comments
2. **Explicit Types**: Always use return type declarations and parameter type hints
3. **Test-Driven**: Every change must have programmatic test coverage
4. **Laravel Way**: Use Artisan commands, Eloquent ORM, and framework conventions
5. **Existing Conventions**: Check sibling files for structure, approach, and naming patterns before creating new code
Before writing code:
**Always use Artisan commands to create files:**
```bash
php artisan make:model --no-interaction [options] {Name}
php artisan make:controller --no-interaction {Name}
php artisan make:request --no-interaction {Name}
php artisan make:test --no-interaction --pest {Name}
php artisan make:class --no-interaction {Name} # For generic PHP classes
```
**PHP Conventions:**
```php
public function __construct(public GitHub $github) { }
```
```php
protected function isAccessible(User $user, ?string $path = null): bool
{
// Implementation
}
```
**Database & Eloquent:**
**Controllers & Validation:**
**Inertia v2 Patterns:**
**Configuration & URLs:**
**Critical: Every change must be tested programmatically.**
**Pest Syntax:**
```php
it('returns all users', function () {
$response = $this->postJson('/api/users', []);
$response->assertSuccessful(); // Use specific assertions
});
```
**Running Tests:**
```bash
php artisan test tests/Feature/ExampleTest.php
php artisan test --filter=testName
php artisan test
```
**Run minimal tests needed to verify changes before finalizing.**
**Run Pint before finalizing (DO NOT run with --dirty flag per project rules):**
```bash
vendor/bin/pint
```
This project upgraded from Laravel 10 **without migrating to the streamlined file structure** (this is recommended by Laravel):
This application uses **Laravel Pennant** for feature flag management. Use `search-docs` to assist with feature flag implementation.
**Vite Manifest Error:**
If you see "Unable to locate file in Vite manifest", run:
```bash
npm run build
npm run dev
composer run dev
```
**Frontend Changes Not Reflected:**
Ask user if they need to run build commands (`npm run build`, `npm run dev`, or `composer run dev`).
Use `search-docs` with multiple broad queries:
**Never include package names in queries** (already passed automatically).
1. User requests: "Add user authentication endpoint"
2. Search docs: `search-docs ["authentication", "api resources", "sanctum"]`
3. Create files using Artisan:
- `php artisan make:controller --no-interaction AuthController`
- `php artisan make:request --no-interaction LoginRequest`
- `php artisan make:test --no-interaction --pest AuthTest`
4. Write clear, typed, self-documenting code (no comments)
5. Write comprehensive tests covering happy/failure/edge cases
6. Run targeted tests: `php artisan test --filter=Auth`
7. Format code: `vendor/bin/pint`
8. Ask user if they want full test suite run
---
This skill ensures consistency with Aiku's established patterns while leveraging modern Laravel 12, Inertia v2, and Vue 3 capabilities.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aiku-erp-development-assistant-0gwzkl/raw