bluetape-rs-patterns
Use when implementing, planning, reviewing, testing, packaging, or releasing Rust code in bluetape-rs or another bluetape ecosystem Rust repository.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when implementing, planning, reviewing, testing, packaging, or releasing Rust code in bluetape-rs or another bluetape ecosystem Rust 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-rs-patterns |
| description | Use when implementing, planning, reviewing, testing, packaging, or releasing Rust code in bluetape-rs or another bluetape ecosystem Rust repository. |
When used inside a bluetape workflow, the parent owns Step DoD, approvals, GitHub metadata, and side effects. This skill owns Rust-specific API, async, Cargo, SQL, testing, and P0/P1 rules.
lib.rs/README style. Keep lib.rs focused; roadmap, issue
history, long guides, and non-goal lists belong in README/spec/plan docs.source(); do not stringify caller-visible causes.unsafe; isolate and document invariants plus safe-boundary tests when
unavoidable.spawn_blocking-style boundary.file:line.unsafe, or invalid Send/Sync;source(), returns ambiguous success/none,
or panics on caller input;Verify ownership/lifetimes, public error variants/source chain, runtime/task lifecycle, cancellation/timeout/backpressure/shutdown, blocking boundary, shared-state/lock/channel/atomic ownership, additive feature matrix, and tests.
SQL plans keep SQL text and bind values separate, define dialect rendering and
transaction semantics, and include SQLx/Testcontainers PostgreSQL proof. New
crate plans compare at least two sibling src/lib.rs and README pairs before
choosing documentation placement.
cargo fmt --all.#[must_use] where ignored results are bugs and #[non_exhaustive]
where public values may grow compatibly.unwrap/expect unless a local invariant is obvious and
documented.tokio::time, explicit shutdown signals, and tested JoinHandle
join/abort policy.Apply bluetape-workflow/references/checklist-contract.md.
RS-01 — Pin crate and feature boundaries
RS-02 — Define ownership and failure contracts
RS-03 — Implement safe Rust-native behavior
RS-04 — Prove behavior and type contracts
RS-05 — Prove feature and external integration matrices
RS-06 — Run the fresh validation ladder
RS-07 — Render the Rust verdict
focused unit tests for pure logic; integration tests for runtime/IO;
#[tokio::test] for Tokio semantics;
trybuild/compile-fail for macro, trait-bound, or type-level contracts;
property/loom-style tooling only when already accepted or justified;
Testcontainers for real external integrations, executed serially when state or ports can interfere;
bounded stress tests for concurrent contracts.
Run the smallest proving set, then expand:
git diff --check and cargo fmt --all --check;cargo test -p <crate> [test];cargo test --workspace;cargo test --workspace --all-features for public/feature changes;cargo clippy --workspace --all-targets --all-features -- -D warnings
when the repository baseline supports it;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.