bluetape-py-patterns
Use when implementing, planning, reviewing, packaging, or releasing Python code in bluetape-py or another bluetape ecosystem Python repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when implementing, planning, reviewing, packaging, or releasing Python code in bluetape-py or another bluetape ecosystem Python repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when any task in a bluetape4k repository must be classified and routed to Type A full feature, B fast track, C bug fix, D review, E maintenance, P publish, or F benchmark self-improvement.
Use when planning, validating, dispatching, recovering, or closing a bluetape4k snapshot, Maven Central release, BOM/catalog train, or consumer synchronization.
Use when bluetape4k work creates or updates technical diagrams, charts, README visuals, docs visuals, blog images, or site visual assets.
Use when a bluetape ecosystem task is a reproducible defect, failed test, regression, static-analysis defect, or review finding that needs a root-cause-driven Type C fix.
Use when a bluetape ecosystem change is a narrow Type B feature, API extension, test improvement, or small class addition that does not need full design artifacts.
Use when an approved bluetape4k Type A change adds a module, dependency, service, subsystem, broad public API, architecture, multi-layer behavior, or large refactor and needs the full spec-to-PR lifecycle.
| name | bluetape-py-patterns |
| description | Use when implementing, planning, reviewing, packaging, or releasing Python code in bluetape-py or another bluetape ecosystem Python repository. |
When used inside a bluetape workflow, the parent owns Step DoD, approvals, GitHub metadata, and side effects. This skill owns Python-specific code, packaging, async, testing, and P0/P1 review rules.
bluetape meta distribution thin (bluetape-core by default),
bluetape-core stdlib-only, logging stdlib-first, and heavier integrations in
focused distributions/extras.bluetape/__init__.py convenience surface. Focused
distributions own imports such as bluetape.core and bluetape.logging.file:line evidence or explicit no findings.asyncio.CancelledError or caller timeout without a proven
translation contract;None/False operational
failure;Verify API shape, public exceptions, package/import/extras boundaries, active/internal/planned status, async task/cancellation/timeout ownership, blocking boundaries, contextvar reset semantics, tests, and realistic examples.
Release plans additionally pin issue/PR metadata, pyproject.toml, uv.lock,
built artifacts, target branch/tag, latest observed version, and publish
authority before any external action.
Protocol/dataclasses only when they remove
real ambiguity.asyncio.CancelledError before broad exception handling.try/finally for every owned resource/token/task.logging, filters/adapters, and
contextvars; no global registry.pyproject.toml, workspace sources,
relevant README locale set, and uv.lock when resolution changes.Apply bluetape-workflow/references/checklist-contract.md.
PY-01 — Pin Python and package boundaries
PY-02 — Define public and async contracts
PY-03 — Implement with isolation and cleanup
PY-04 — Prove behavior and isolation
PY-05 — Prove packaging changes
PY-06 — Run the fresh validation ladder
PY-07 — Render the Python verdict
pytest unit/import tests; pytest-asyncio for loop-dependent async behavior;
parametrized success/invalid/empty/boundary and caller-value preservation;
bounded cancellation/timeout tests with cleanup assertions, not long sleeps;
logging/context isolation, reset, redaction, and no-global-side-effect tests;
package build plus isolated wheel/import/extra smoke checks when metadata or namespace packages change;
serialize Testcontainers/shared external-state tests.
Run the smallest proving set, then expand:
git diff --check;uv run ruff format --check . and uv run ruff check .;uv run pytest <path>;uv sync --all-packages when dependency/workspace state matters;uv build --all-packages plus isolated import smoke for packaging changes;If broader validation is blocked by an unrelated baseline/environment failure, record the exact error and run the strongest unaffected targeted/workspace commands.
Report reviewed diff/baseline, evidence commands, findings with file:line,
exact P0=<n> P1=<n>, verdict, and gaps. PASS requires P0=0 and P1=0.