smithery.ai

elite-py-314

Python Engineering Doctrine (Python ≥ 3.14, Nogil-Ready, Correctness-First)

First seen May 6, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,518 B
  • docs SUMMARY.md 97 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Python Engineering Doctrine (Python ≥ 3.14)

I. Core Doctrine

  • Runtime: Python ≥ 3.14 (Nogil-Ready).
  • Mindset: Design as if the GIL does not exist (thread-safe by default).

II. Typing & Static Guarantees

  • Typing: Mandatory strict typing. Use pyright (preferred) or mypy --strict.
  • Type Escape Policy: # type: ignore is forbidden unless justified and documented.

III. Code Style & Structure

  • Formatting: ruff as the single source of truth.
  • Data Modeling: Prefer immutable models. Use @dataclass(frozen=True).
  • Async: Use asyncio.TaskGroup for structured concurrency.

IV. Error Model & Boundaries

  • No Silent Failures: Bare except: is forbidden.
  • Explicit Handling: Errors must be handled explicitly or re-raised with context.
  • Custom Exceptions: Domain errors must use custom exception classes.

V. Concurrency & Nogil Safety

  • State: Avoid shared mutable global state. Prefer message passing or immutable data structures.
  • Primitives: Thread-safe primitives must be explicit.

VI. Worker Life-cycle & IPC (Mission 014)

  • Fate-sharing: Workers MUST implement a "Watchdog" thread monitoring stdin. If stdin closes, the process MUST exit immediately.
  • Standalone Mode: Workers should be runnable via CLI with --path and --lane arguments for testing and isolation.
  • JSON Serialization: Return data MUST be valid JSON matching the ExtractionProduct schema.
  • Dependency Isolation: Prefer lightweight libraries for workers (e.g., polars, pymupdf) to keep memory footprint predictable.

VII. Testing & Quality

  • Coverage: ≥ 85% for core logic.
  • Layers: Unit tests for logic, integration tests for pipelines.

VIII. Observability

  • Logging: Structured logging with contextual metadata.
  • Tracing: Tracing hooks for critical flows.

IX. Data Purity Protocol (The Janitor's Decree)

  • Encoding Boundary: All text data sent to Rust via IPC MUST be strictly UTF-8.
  • No Mojibake: Workers are responsible for detecting and discarding malformed characters before serialization.
  • Pure Extraction: Python Workers focus on RAW extraction. No cleaning or normalization of numbers should happen here; that is the Janitor's role in Rust.
  • IPC Contract: Match the camelCase protocol and avoid non-UTF-8 compatible byte streams in JSON payloads.