Audit Rust code for idioms and security
rust-expertsubagentsetup L2★1
gilmry/koprogo ↗What it does
Review Rust backend code for idioms, types, and hexagonal architecture compliance
Best for
Enforcing senior Rust quality (Decimal vs f64 for money, typed AppError vs Result<_,String>, zero infra imports in domain/) and preventing latent numerical bugs in KoproGo financial computations.
Inputs
- · PR diff or backend/src/ files
- · Cargo.toml dependencies
- · migration files
Outputs
- · PR review comments citing idioms violations
- · RFC proposals for major refactors
- · weekly-rust-quality report
Requires
- · cargo check
- · cargo clippy
- · cargo audit
- · cargo expand
- · grep
Preconditions
- · Rust 1.56+
- · backend/ module structure intact
- · thiserror crate for AppError
Failure modes
- · Overlooked f64 in domain/ if mixed with float type names
- · Unsafe without RFC if not flagged
- · Circular import if hexagonal boundary violated
Trust signals
- · Tier 1/Tier 2 governance split (review vs modify)
- · Anti-pattern chase automation (weekly f64/unwrap scans)
- · Specific error type examples (AppError with thiserror)
- · PCMN Belgium compliance rationale for Decimal
- · Security escalation path for unsafe/advisory