Skip to content

Commit 3556dc7

Browse files
committed
cursor(rules[dev-loop]): Format, Test, then Typecheck and Lint
why: Reordering development workflow prioritizes code correctness over style conformance. This prevents wasting time fixing linting/typing issues in code that may still need substantial changes based on test results. Ensures developers focus on getting functionality correct first before polishing. what: - Restructured development workflow to prioritize formatting and test correctness first - Moved linting and type checking to occur after initial tests pass - Added explicit verification of tests after linting/type fixes - Established clear commit points in the workflow (after initial tests and after linting) - Added numbered steps for clearer process flow - Improved section headers and organization for better readability - Maintained requirement to fix failures at each step before proceeding refs: Supports improved developer workflow efficiency and reduces unnecessary rework
1 parent 7db6426 commit 3556dc7

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

.cursor/rules/dev-loop.mdc

+35-14
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,56 @@ description: QA every edit
33
globs: *.py
44
---
55

6-
# First: QA Every edit
6+
# Development Process
77

8-
Run these commands between edits:
8+
## 1. Start with Formatting
99

10-
Check typings:
10+
Format your code first:
1111

1212
```
13-
uv run mypy
13+
uv run ruff format .
14+
```
15+
16+
## 2. Run Tests
17+
18+
Verify that your changes pass the tests:
19+
20+
```
21+
uv run py.test
22+
```
23+
24+
## 3. Commit Initial Changes
25+
26+
Make an atomic commit for your changes using conventional commits.
27+
Use `@git-commits.mdc` for assistance with commit message standards.
28+
29+
## 4. Run Linting and Type Checking
30+
31+
Check and fix linting issues:
32+
33+
```
34+
uv run ruff check . --fix --show-fixes
1435
```
1536

16-
Lint:
37+
Check typings:
1738

1839
```
19-
uv run ruff check . --fix --show-fixes; uv run ruff format .;
40+
uv run mypy
2041
```
2142

22-
Check tests:
43+
## 5. Verify Tests Again
44+
45+
Ensure tests still pass after linting and type fixes:
2346

2447
```
2548
uv run py.test
2649
```
2750

28-
Between every edit, rerun:
29-
- Type checks
30-
- Lint
31-
- Tests
51+
## 6. Final Commit
3252

33-
If there's any failures *due to the edits*, fix them first, then:
53+
Make a final commit with any linting/typing fixes.
54+
Use `@git-commits.mdc` for assistance with commit message standards.
3455

35-
# When your edit is complete: Commit it
56+
## Development Loop Guidelines
3657

37-
Make an atomic commit for the edit, using conventional commits.
58+
If there are any failures at any step due to your edits, fix them before proceeding to the next step.

0 commit comments

Comments
 (0)