--- 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. - Batch style, type, lint, and test verification at the end of the full implementation rather than after each individual file edit. - When relevant, run the project's aggregate lint command at the end, such as `composer run lint` for PHP formatting or `npm run lint` for frontend linting. - If model and controller work happen in the same task, verify both sides in that same task.