Skip to content

Commit 1611518

Browse files
committed
cursor,windsurf(rules[dev-loop]) Sync with latest python loop
1 parent 8051d93 commit 1611518

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

.cursor/rules/avoid-debug-loops.mdc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: When stuck in debugging loops, break the cycle by minimizing to an MVP, removing debugging cruft, and documenting the issue completely for a fresh approach
33
globs: *.py
4-
alwaysApply: false
4+
alwaysApply: true
55
---
66
# Avoid Debug Loops
77

.cursor/rules/git-commits.mdc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: git-commits: Git commit message standards and AI assistance
33
globs: git-commits: Git commit message standards and AI assistance | *.git/* .gitignore .github/* CHANGELOG.md CHANGES.md
4+
alwaysApply: true
45
---
56
# Optimized Git Commit Standards
67

.cursor/rules/notes-llms-txt.mdc

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description: LLM-friendly markdown format for notes directories
3+
globs: notes/**/*.md,**/notes/**/*.md
4+
alwaysApply: true
5+
---
6+
7+
# Instructions for Generating LLM-Optimized Markdown Content
8+
9+
When creating or editing markdown files within the specified directories, adhere to the following guidelines to ensure the content is optimized for LLM understanding and efficient token usage:
10+
11+
1. **Conciseness and Clarity**:
12+
- **Be Brief**: Present information succinctly, avoiding unnecessary elaboration.
13+
- **Use Clear Language**: Employ straightforward language to convey ideas effectively.
14+
15+
2. **Structured Formatting**:
16+
- **Headings**: Utilize markdown headings (`#`, `##`, `###`, etc.) to organize content hierarchically.
17+
- **Lists**: Use bullet points (`-`) or numbered lists (`1.`, `2.`, etc.) to enumerate items clearly.
18+
- **Code Blocks**: Enclose code snippets within triple backticks (```) to distinguish them from regular text.
19+
20+
3. **Semantic Elements**:
21+
- **Emphasis**: Use asterisks (`*`) or underscores (`_`) for italicizing text to denote emphasis.
22+
- **Strong Emphasis**: Use double asterisks (`**`) or double underscores (`__`) for bold text to highlight critical points.
23+
- **Inline Code**: Use single backticks (`) for inline code references.
24+
25+
4. **Linking and References**:
26+
- **Hyperlinks**: Format links using `[Link Text](mdc:URL)` to provide direct access to external resources.
27+
- **References**: When citing sources, use footnotes or inline citations to maintain readability.
28+
29+
5. **Avoid Redundancy**:
30+
- **Eliminate Repetition**: Ensure that information is not unnecessarily repeated within the document.
31+
- **Use Summaries**: Provide brief summaries where detailed explanations are not essential.
32+
33+
6. **Standard Compliance**:
34+
- **llms.txt Conformance**: Structure the document in alignment with the `llms.txt` standard, which includes:
35+
- An H1 heading with the project or site name.
36+
- A blockquote summarizing the project's purpose.
37+
- Additional markdown sections providing detailed information.
38+
- H2-delimited sections containing lists of URLs for further details.
39+
40+
By following these guidelines, the markdown files will be tailored for optimal LLM processing, ensuring that the content is both accessible and efficiently tokenized for AI applications.
41+
42+
For more information on the `llms.txt` standard, refer to the official documentation: https://llmstxt.org/

.windsurfrules

+15
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,18 @@
119119
- Use tmp_path (pathlib.Path) fixture over Python's tempfile
120120
- Use monkeypatch fixture over unittest.mock
121121
</pytest_testing_guidelines>
122+
123+
<import_guidelines>
124+
- Prefer namespace imports over importing specific symbols
125+
- Import modules and access attributes through the namespace:
126+
- Use `import enum` and access `enum.Enum` instead of `from enum import Enum`
127+
- This applies to standard library modules like pathlib, os, and similar cases
128+
- For typing, use `import typing as t` and access via the namespace:
129+
- Access typing elements as `t.NamedTuple`, `t.TypedDict`, etc.
130+
- Note primitive types like unions can be done via `|` pipes
131+
- Primitive types like list and dict can be done via `list` and `dict` directly
132+
- Benefits of namespace imports:
133+
- Improves code readability by making the source of symbols clear
134+
- Reduces potential naming conflicts
135+
- Makes import statements more maintainable
136+
</import_guidelines>

0 commit comments

Comments
 (0)