

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345## Context67This instruction file applies to all Python source files. The project uses Python 3.11+ with strict type annotations enforced by `mypy --strict`. All code must pass `ruff format` and `ruff check` with zero warnings. `logging` is mandatory — `print()` is never acceptable in production code. Dependencies are managed via `pyproject.toml` with version pinning.89---1011## Coding Standards1213- **Python version:** 3.11+ minimum; use `match` expressions, `ExceptionGroup`, `tomllib` where appropriate14- **Type annotations on everything:** All function parameters and return types; `mypy --strict` must pass15- **`logging` not `print()`:** `logging.getLogger(__name__)` in every module; parameterised messages only16- **No bare `except:`:** Always catch a specific exception class; bare `except` masks `SystemExit` and `KeyboardInterrupt`17- **No `import *`:** Explicit imports only — `from module import NameA, NameB`18- **Pydantic or `@dataclass(frozen=True)` for domain objects:** Never raw `dict` as a domain object19- **Constructor injection:** No module-level singleton instances; inject via FastAPI `Depends` or `__init__` parameters20- **`async def` for all I/O:** Never blocking calls (`requests`, `time.sleep`) inside `async def` functions21- **Settings via `BaseSettings`:** All configuration via `pydantic_settings.BaseSettings`; no hardcoded values22- **`pyproject.toml`:** All project metadata, dependencies, and tool config in `pyproject.toml` — no `setup.py`2324---2526## Preferred Patterns2728### Type-Annotated Function2930```python31# ✅ CORRECT32import logging33from typing import Sequence3435logger = logging.getLogger(__name__)3637async def find_orders(customer_id: str, statuses: list[str]) -> Sequence[Order]:38 logger.info("Fetching orders: customer_id=%s, statuses=%s", customer_id, statuses)39 return await order_repo.find_by_customer(customer_id, statuses)4041# ❌ WRONG — no annotations, print() instead of logging42def find_orders(customer_id, statuses):43 print(f"Fetching orders for {customer_id}")44 return order_repo.find_by_customer(customer_id, statuses)45```4647### Specific Exception Handling4849```python50# ✅ CORRECT51try:52 result = await external_service.call(payload)53except ServiceUnavailableError as exc:54 logger.error("External service unavailable", exc_info=True)55 raise DependencyError("Payment service") from exc5657# ❌ WRONG — bare except catches SystemExit, KeyboardInterrupt58try:59 result = await external_service.call(payload)60except:61 pass62```6364### Pydantic Domain Object6566```python67# ✅ CORRECT68from pydantic import BaseModel, field_validator6970class OrderId(BaseModel):71 model_config = {"frozen": True}72 value: str7374 @field_validator("value")75 @classmethod76 def must_be_non_empty(cls, v: str) -> str:77 if not v.strip():78 raise ValueError("OrderId must not be empty")79 return v8081# ❌ WRONG — raw dict as domain object82def process_order(order: dict) -> dict:83 ...84```8586### Settings via BaseSettings8788```python89# ✅ CORRECT90from pydantic_settings import BaseSettings9192class AppSettings(BaseSettings):93 model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}9495 database_url: str96 secret_key: str97 kafka_bootstrap_servers: str9899# ❌ WRONG — hardcoded configuration100DATABASE_URL = "postgresql://user:password@localhost/db"101```102103---104105## Anti-Patterns — Do NOT Generate106107```python108# WRONG: print() instead of logging [BLOCKER]109print(f"Processing order {order_id}")110111# WRONG: bare except [BLOCKER]112try:113 do_something()114except:115 pass116117# WRONG: import star [MAJOR]118from myapp.models import *119120# WRONG: mutable default argument [MAJOR]121def add_item(item: str, items: list[str] = []) -> list[str]:122 items.append(item)123 return items124125# WRONG: blocking I/O in async function [MAJOR]126async def fetch_data(url: str) -> bytes:127 import requests128 return requests.get(url).content # blocks event loop129130# WRONG: module-level singleton (global state) [MAJOR]131db_engine = create_engine(DATABASE_URL)132133# WRONG: missing type annotations [MAJOR]134def process(data):135 return data["value"]136137# WRONG: Optional.get() equivalent — unguarded attribute access [MINOR]138result = repo.find_by_id(id)139return result.value # AttributeError if None140```141142---143144## Dependencies & Versions145146| Technology | Version | Notes |147|-----------|---------|-------|148| Python | 3.11+ | Required for `ExceptionGroup`, `tomllib`, improved typing |149| Pydantic | 2.x | `model_config` dict replaces `class Config:` |150| pydantic-settings | 2.x | `BaseSettings` for environment configuration |151| mypy | 1.x | Run with `--strict`; must pass with zero errors |152| Ruff | 0.4+ | Replaces Black + Flake8 + isort; `ruff format` + `ruff check` |153| pytest | 7.x+ | Async tests via `pytest-asyncio`; fixtures over `setUp/tearDown` |154| pytest-asyncio | 0.23+ | `asyncio_mode = "auto"` in `pyproject.toml` |155| httpx | 0.27+ | Async HTTP client; `AsyncClient` for async routes |156157---158159## Test Conventions160161- Use `pytest` with `pytest-asyncio` for async tests — never `unittest.TestCase`162- Mock external dependencies with `unittest.mock.AsyncMock` or `pytest-mock`163- Use `Testcontainers` (via `testcontainers-python`) for database integration tests164- Test file mirrors source: `src/myapp/orders.py` → `tests/test_orders.py`165- One test class per domain class; one test method per behaviour166- Use `pytest.mark.parametrize` for boundary value and equivalence class tests167- Never use `time.sleep()` in tests — use `asyncio.wait_for()` or `anyio.fail_after()`168
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?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/python.mdc · 1 | Cursor rules | lint-formatstyletypesapi+1 | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-github-instructions-python-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.