| name | validate-conventions |
| description | Review changed code against project conventions and rules |
| auto-invocable | true |
| triggers | ["review my code","check conventions","validate changes","lint my changes","check my code"] |
Validate Conventions
Review changed code against all project conventions defined in CONVENTIONS.md.
Steps
1. Get Changed Files
Run git diff --name-only HEAD to find modified files. If no uncommitted changes, check git diff --name-only HEAD~1 for the last commit.
If the user specifies particular files, use those instead.
2. Read Changed Files
Read each changed file to inspect the code.
3. Check Against Rules
For each file, check ALL of the following rules:
Import Rules
Component Rules
Style Rules
State Management Rules
i18n Rules
TypeScript Rules
File Organization Rules
API Pattern Rules
Other Rules
4. Report Findings
For each issue found, report:
[RULE] <rule name>
[FILE] <file_path>:<line_number>
[ISSUE] <description of the violation>
[FIX] <how to fix it>
Group findings by file. Show clean files too: <file_path> - No issues found
5. Run Validation
Run npm run validate as a final automated check (TypeScript + ESLint + Prettier).
Report the results.
6. Summary
Checked: X files
Issues found: Y
- Import issues: N
- Style issues: N
- i18n issues: N
- TypeScript issues: N
- Other: N
npm run validate: PASS/FAIL
Critical Rules
- Check EVERY rule for EVERY changed file - don't skip any
- Report file:line references for all issues
- Suggest concrete fixes, not just "fix this"
- Run
npm run validate as the final step
- If locale files changed, verify both have identical key structures