skills setup

This commit is contained in:
2026-03-25 00:24:24 +01:00
parent 8ab7bb9c63
commit 9d90bde323
2 changed files with 67 additions and 1 deletions
@@ -0,0 +1,55 @@
---
name: project-verification-discipline
description: 'Always apply for this project when changing Vue or TypeScript files, Laravel models, or Laravel controllers. Enforces final type-checking for Vue/TS changes, migration, factory, and seeder verification for model changes, required PHPUnit coverage for models and controllers, and running the affected tests before finalizing.'
---
# Project Verification Discipline
## When to Apply
Activate this skill whenever work in this project includes:
- Vue files
- TypeScript files
- Laravel models
- Laravel controllers
## Required verification
### Vue and TypeScript changes
- End the task with `npm run types:check`.
- Do not finalize Vue or TypeScript changes until the type-check passes, or clearly report why it could not be completed.
### Laravel model changes
- Check whether the model change requires a migration.
- If the database schema or persisted structure must change, add or update the migration in the same task.
- Create a factory for every new model.
- Keep the model factory up to date whenever the model shape, required attributes, or relationships change.
- Create one or more seeders that use factories to generate dummy data for every new model.
- Keep related seeders up to date whenever the model shape, required attributes, or relationships change.
- Create or update PHPUnit coverage for the model behavior.
- Run the affected PHPUnit tests before finalizing.
### Laravel controller changes
- Create or update PHPUnit coverage for the controller behavior.
- Run the affected PHPUnit tests before finalizing.
## Coverage expectations
- New models must not be introduced without matching PHPUnit coverage.
- New models must not be introduced without a factory.
- New models must not be introduced without one or more relevant seeders using factories.
- Changed models must have their PHPUnit coverage updated when behavior or persistence rules change.
- Changed models must have their factories updated when the model contract changes.
- Changed models must have their seeders updated when seeded data would become invalid or incomplete.
- New controllers must not be introduced without matching PHPUnit coverage.
- Changed controllers must have their PHPUnit coverage updated when behavior, authorization, validation, or responses change.
## Notes
- Follow the project's existing PHPUnit conventions.
- Prefer the smallest relevant test run that still proves the change.
- If model and controller work happen in the same task, verify both sides in that same task.
+12 -1
View File
@@ -37,6 +37,7 @@ This project has domain-specific skills available. You MUST activate the relevan
- `inertia-vue-development` — Develops Inertia.js v2 Vue client-side applications. Activates when creating Vue pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions Vue with Inertia, Vue pages, Vue forms, or Vue navigation.
- `tailwindcss-development` — Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS.
- `fortify-development` — ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions Fortify, auth, authentication, login, register, signup, forgot password, verify email, 2FA, or references app/Actions/Fortify/, CreateNewUser, UpdateUserProfileInformation, FortifyServiceProvider, config/fortify.php, or auth guards. Fortify is the frontend-agnostic authentication backend for Laravel that registers all auth routes and controllers. Also activate when building SPA or headless authentication, customizing login redirects, overriding response contracts like LoginResponse, or configuring login throttling. Do NOT activate for Laravel Passport (OAuth2 API tokens), Socialite (OAuth social login), or non-auth Laravel features.
- `project-verification-discipline` — Always activate for this project when changing Vue or TypeScript files, Laravel models, or Laravel controllers. It enforces final type-checking for Vue/TS changes and stricter migration, factory, seeder, and PHPUnit verification for model and controller work.
## Conventions
@@ -47,6 +48,15 @@ This project has domain-specific skills available. You MUST activate the relevan
## Verification Scripts
- Do not create verification scripts or tinker when tests cover that functionality and prove they work. Unit and feature tests are more important.
- Every change to Vue or TypeScript files must end with `npm run types:check`.
- Every new or modified Laravel model must be checked for the required migration changes. If schema or persisted data shape changes are needed, include the migration in the same task.
- Every new Laravel model must include a factory.
- Every modified Laravel model must keep its factory up to date with the current model shape and required attributes.
- Every new Laravel model must be covered by one or more seeders that use factories to generate dummy data.
- Every modified Laravel model must keep its related seeders up to date when the model shape, required attributes, or relationships change.
- Every new or modified Laravel model must have PHPUnit coverage created or updated.
- Every new or modified Laravel controller must have PHPUnit coverage created or updated.
- When a model or controller is added or changed, run the affected PHPUnit tests before finalizing.
## Application Structure & Architecture
@@ -102,7 +112,7 @@ This project has domain-specific skills available. You MUST activate the relevan
- Execute PHP in app context for debugging and testing code. Do not create models without user approval, prefer tests with factories instead. Prefer existing Artisan commands over custom tinker code.
- Always use single quotes to prevent shell expansion: `php artisan tinker --execute 'Your::code();'`
- Double quotes for PHP strings inside: `php artisan tinker --execute 'User::where("active", true)->count();'`
- Double quotes for PHP strings inside: `php artisan tinker --execute 'User::where("active", true)->count();'`
=== php rules ===
@@ -209,6 +219,7 @@ Wayfinder generates TypeScript functions for Laravel routes. Import from `@/acti
# Inertia + Vue
Vue components must have a single root element.
- IMPORTANT: Activate `inertia-vue-development` when working with Inertia Vue client-side patterns.
</laravel-boost-guidelines>