diff --git a/.agents/skills/project-verification-discipline/SKILL.md b/.agents/skills/project-verification-discipline/SKILL.md new file mode 100644 index 0000000..3e50d2d --- /dev/null +++ b/.agents/skills/project-verification-discipline/SKILL.md @@ -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. diff --git a/AGENTS.md b/AGENTS.md index 884e1c5..b5f7ab6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 ,