You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Rule: Polyrepo Auto Validation (Test + Typecheck + Lint)
7
+
8
+
## Purpose
9
+
Ensure that in a polyrepo (single-package repository) environment, the agent always validates changes to the codebase by running appropriate test, typecheck, and lint commands for the current project — using the most idiomatic command names available, and gracefully handling variations.
10
+
11
+
## Trigger
12
+
This rule activates after the agent:
13
+
- Implements any change to source code
14
+
- Modifies or creates tests
15
+
- Completes a feature, bugfix, or refactor task
16
+
- Prepares code for commit, handoff, or pull request
17
+
18
+
## Behavior
19
+
20
+
### 1. Validate Tests, Types, and Linting for the Current Project
21
+
Run all applicable validation steps, in the following order:
22
+
23
+
#### ✅ Run Type Checking
24
+
Try each of the following, in order:
25
+
```bash
26
+
pnpm run typecheck
27
+
pnpm run type-check
28
+
pnpm exec tsc --noEmit
29
+
```
30
+
Log which command was successful. If none exist, prompt to add a `typecheck` script.
31
+
32
+
#### ✅ Run Linting
33
+
Try each of the following:
34
+
```bash
35
+
pnpm run lint
36
+
pnpm run lint:fix
37
+
pnpm exec eslint .
38
+
```
39
+
Prefer commands that include auto-fix functionality if available.
40
+
41
+
#### ✅ Run Tests
42
+
Try each of the following:
43
+
```bash
44
+
pnpm run test
45
+
pnpm run test:watch
46
+
pnpm exec vitest
47
+
```
48
+
Use the most complete and fast test suite runner available. If all fail, check for a `vitest.config.ts` or equivalent and suggest adding a test script.
49
+
50
+
---
51
+
52
+
### 2. Fallback Handling
53
+
- If no matching script is found for any of the above categories, log a warning and suggest adding a minimal `package.json` entry (e.g., `"typecheck": "tsc --noEmit"`).
54
+
- Do **not** fail unless the project is required to pass validation (e.g., before commit).
55
+
56
+
---
57
+
58
+
### 3. Report Validation Results
59
+
After running all steps:
60
+
- Log which commands were run and succeeded/failed
61
+
- Summarize any failed validations
62
+
- Suggest next steps if validation failed (e.g., run fixes, edit files, re-run specific command)
63
+
64
+
---
65
+
66
+
## Best Practices
67
+
- Always run validations before attempting to commit code
68
+
- If working in a CI/CD environment, ensure these commands match the pipeline
69
+
- Ensure `package.json` has consistent naming conventions for `typecheck`, `lint`, `test`
70
+
- If a script is missing, prefer adding a wrapper script instead of hardcoding commands
- **no-tailwind.mdc:** Prevent the use of Tailwind CSS.
19
+
- **readme.rules.mdc:** Consider updating the root README after major changes.
20
+
- **targeted-validation.rules.mdc:** Validate changes by running typecheck, lint, and test commands.
21
+
22
+
**Note:** Rules marked with `alwaysApply: true` should be continuously enforced. Other rules in this list are triggered by specific events (e.g., after completing a task).
return`You are a persuasive, slightly biased career coach assistant helping David Mieloch create a job application.
369
-
370
-
Your task is to analyze a job description, compare it with David's qualifications, and write a compelling analysis showing why he is an exceptional candidate for the role. This is not a neutral comparison - you should advocate for David.
371
-
372
-
Here is David's resume data:
373
-
${JSON.stringify(resumeData,null,2)}
374
-
375
-
IMPORTANT GUIDELINES:
376
-
1. Be persuasive but truthful - find genuine connections between the job requirements and David's experience
377
-
2. Emphasize his strengths and use quantifiable results where possible
378
-
3. Address potential gaps by showing transferable skills
379
-
4. Use a professional, confident tone with a touch of personality
380
-
5. Include subtle humor where appropriate
381
-
6. Structure your analysis in a clear, organized way
382
-
7. Format your response so it can be easily converted to different formats (summary, cover letter, recruiter pitch)
383
-
8. Include statistics and metrics from his past roles when relevant
384
-
9. Advocate for David as if you were his personal career agent
385
-
10. Avoid excessive formality and corporate speak - be personable but professional`;
0 commit comments