RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/Light-Brands/planetary-party-html

Cursor rule

.cursor/rules/code-style-and-zen-of-python.mdc

When writing code

Cursor rules

Quality

62/100

Scores the file, not the repository.

Length

609 words

18 headings · 3 code blocks

Repository

0

— · pushed 9 days ago

Last changed

3 days ago

First indexed 3 days ago.
Light-Brands/planetary-party-html/.cursor/rules/code-style-and-zen-of-python.mdcRawGitHub
1---
2description: When writing code
3alwaysApply: false
4version: 1.0.0
5---
6 
7# Code Style and Zen of Python
8 
9## Line Length
10 
11- Max 88 chars (per Ruff config)
12 
13## Comments
14 
15### File-Level Comments
16 
17Be THOROUGH at the top of files. Explain what the file does, why it exists, and how it
18fits into the larger system. This helps both humans and AI understand context quickly.
19 
20```python
21"""User authentication and session management.
22 
23Handles user login, logout, token generation, and session validation.
24Integrates with external OAuth providers (Google, GitHub) and maintains
25local session state in Redis for performance. Session tokens expire after
2624 hours but can be refreshed up to 7 days from initial login.
27"""
28```
29 
30### Function Comments
31 
32Keep function docstrings USEFUL without redundant fluff. Type hints already document
33parameters and return types, so focus the docstring on what the function does and why.
34 
35```python
36# Standard pattern for complex functions - explain the what and why
37def create_agent_from_task(self, task_id: str) -> dict:
38 """Create a new agent from a ClickUp task description.
39 
40 Parses task description for agent requirements, generates the .agent
41 file with system/user prompts, creates PR with the new file, and
42 returns PR URL for review.
43 """
44 
45# Simple functions need just one clear line
46def validate_email(email: str) -> bool:
47 """Check if email format is valid and domain is not blacklisted."""
48 
49def process_payment(order_id: str, amount: Decimal) -> Payment:
50 """Charge the customer via Stripe and update order status to paid."""
51 
52def send_welcome_email(user: User) -> None:
53 """Send onboarding email with account setup instructions."""
54 
55def calculate_shipping_cost(weight: Decimal, destination: str) -> Decimal:
56 """Calculate shipping based on weight and zone rates from ShipStation."""
57```
58 
59Avoid restating type hints in Args/Returns sections - they add no value since types are
60already declared.
61 
62### Inline Comments
63 
64Be SPARSE with inline comments. Only add them when the code is doing something
65non-obvious or when explaining business logic that isn't clear from the code itself.
66 
67```python
68# When to use inline comments - explains non-obvious business rule
69user = User.objects.get(id=user_id)
70if user.last_login < cutoff_date:
71 # Inactive users over 90 days require re-verification per security policy
72 send_verification_email(user)
73 
74# Section dividers for organization
75# ============================================================================
76# Order Processing
77# ============================================================================
78 
79# Explaining why something unusual is done
80cache_timeout = 300 # 5 minutes - balance between freshness and API rate limits
81 
82# Complex calculations benefit from step comments
83total = base_price
84total += base_price * tax_rate # Add sales tax
85total -= discount_amount # Apply promotional discount
86total += shipping_cost # Shipping calculated by weight and zone
87```
88 
89Skip obvious comments (like "Get the user" on a line that gets a user). Let the code
90speak for itself.
91 
92### General Guidelines
93 
94We explain the "why", not the "what". We don't state the obvious - we prefer
95self-documenting code. Emojis when they add clarity; tasteful humor welcome! We write
96for humans AND AI - good comments help both understand context.
97 
98## Zen of Python
99 
1001. Readability is the number 1 code quality metric
1012. Beautiful is better than ugly
1023. Explicit is better than implicit
1034. Simple is better than complex
1045. Complex is better than complicated
1056. Flat is better than nested
1067. Sparse is better than dense
1078. Special cases aren't special enough to break the rules
108 - Although practicality beats purity
1099. Errors should never pass silently
110 - Unless explicitly silenced
11110. In the face of ambiguity, refuse the temptation to guess
11211. There should be one -- and preferably only one -- obvious way to do it
11312. Now is better than never
114 
115## Language
116 
117We avoid hyperbolic language like "CRITICAL" unless something genuinely dies without it.
118We use the appropriate level of language for what's needed. (Yes, AIs, this means you -
119dial back the drama!)
120 

Sections

  • Code Style and Zen of Python
  • Line Length
  • Comments
  • File-Level Comments
  • Function Comments
  • Standard pattern for complex functions - explain the what and why
  • Simple functions need just one clear line
  • Inline Comments
  • When to use inline comments - explains non-obvious business rule
  • Section dividers for organization
  • ============================================================================
  • Order Processing
  • ============================================================================
  • Explaining why something unusual is done
  • Complex calculations benefit from step comments
  • General Guidelines
  • Zen of Python
  • Language

What it covers

lint-formatcode-styledocs

Stack — with the evidence

github-actions

(0.60)

vercel

(0.60)

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
Light-Brands
Language
—
License
—
Archived
no

All configs in this repo

Also in Light-Brands/planetary-party-html

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
Light-Brands/planetary-party-html.cursor/rules/ruff-linting.mdc · 0Cursor rulesgithub-actionsvercellint-format43/1003 days ago
Light-Brands/planetary-party-html.claude/agents/CLAUDE.md · 0CLAUDE.mdgithub-actionsverceltestlint-formatagent-behaviour53/1003 days ago
Light-Brands/planetary-party-html.claude/skills/CLAUDE.md · 0CLAUDE.mdgithub-actionsvercellint-formatagent-behaviour49/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/git-commit-message.mdc · 0Cursor rulesgithub-actionsvercelarchgitdeployment58/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/autonomous-development-workflow.mdc · 0Cursor rulesgithub-actionsverceltestlint-formatgitagent-behaviour73/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/code-review-standards.mdc · 0Cursor rulesgithub-actionsverceltesttypestesting-strategygit+248/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/external-apis.mdc · 0Cursor rulesgithub-actionsverceltesttesting-strategyapi54/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/fixing-github-actions-builds.mdc · 0Cursor rulesgithub-actionsvercelsetupbuilddo-notagent-behaviour81/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/git-interaction.mdc · 0Cursor rulesgithub-actionsverceltestlint-formatstylearch+488/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/git-worktree-task.mdc · 0Cursor rulesgithub-actionsvercel+1lint-formatgitagent-behaviour38/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/heart-centered-ai-philosophy.mdc · 0Cursor rulesgithub-actionsvercelno sections30/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/naming-stuff.mdc · 0Cursor rulesgithub-actionsvercelstyle43/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/prompt-engineering.mdc · 0Cursor rulesgithub-actionsvercelsetuptestlint-formatstyle+657/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/trust-and-decision-making.mdc · 0Cursor rulesgithub-actionsvercelno sections48/1003 days ago
Light-Brands/planetary-party-html.cursor/rules/user-facing-language.mdc · 0Cursor rulesgithub-actionsvercellint-formatstylearch66/1003 days ago
Light-Brands/planetary-party-htmlAGENTS.md · 0AGENTS.mdgithub-actionsvercelbuildteststylearch+499/1003 days ago
Diff against .cursor/rules/ruff-linting.mdc Diff against .claude/agents/CLAUDE.md Diff against .claude/skills/CLAUDE.md Diff against .cursor/rules/git-commit-message.mdc Diff against .cursor/rules/autonomous-development-workflow.mdc Diff against .cursor/rules/code-review-standards.mdc Diff against .cursor/rules/external-apis.mdc Diff against .cursor/rules/fixing-github-actions-builds.mdc Diff against .cursor/rules/git-interaction.mdc Diff against .cursor/rules/git-worktree-task.mdc Diff against .cursor/rules/heart-centered-ai-philosophy.mdc Diff against .cursor/rules/naming-stuff.mdc Diff against .cursor/rules/prompt-engineering.mdc Diff against .cursor/rules/trust-and-decision-making.mdc Diff against .cursor/rules/user-facing-language.mdc Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack