docs.rs failed to build miyabi-agent-review-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
miyabi-agent-review
Code review, quality scoring (100-point scale), and security scanning agent for the Miyabi framework.
π Overview
miyabi-agent-review (ιη§°: γγ γΎγ) is an automated code review agent that performs comprehensive quality analysis on Rust codebases. It integrates cargo clippy, cargo check, cargo-audit, and test coverage tools to generate detailed quality reports with actionable recommendations.
Key Capabilities:
- π Linting Analysis: Runs
cargo clippyand scores based on warnings - π οΈ Type Checking: Runs
cargo checkand detects compilation errors - π Security Scanning: Uses
cargo-auditto detect known vulnerabilities - π Coverage Analysis: Calculates test coverage (integrates with
cargo-tarpaulin) - π 100-Point Scoring: Generates overall quality score with detailed breakdown
- β οΈ Escalation: Automatically escalates to Tech Lead if score < 60
π Features
- Automated Quality Scoring: 100-point scale based on:
- Clippy warnings (100 - warnings Γ 5)
- Type errors (100 - errors Γ 10)
- Security vulnerabilities (dynamic scoring based on severity)
- Test coverage (target: 80%+)
- Detailed Issue Reporting: File, line, severity, and message for each issue
- Recommendations: Actionable suggestions to improve code quality
- Escalation Logic: Automatically escalates low-quality code (< 60 score) to human reviewers
- JSON Output: Structured quality reports for CI/CD integration
π¦ Installation
Add to your Cargo.toml:
[]
= "0.1.0"
Or install the CLI:
π§ Usage
As a Library
use ReviewAgent;
use BaseAgent;
use ;
async
As a CLI Tool
# Review current directory
# Review specific path
# With custom config
π Quality Report Structure
π Security Scanning
The agent integrates cargo-audit to detect known security vulnerabilities:
# Install cargo-audit (required for security scanning)
# Review will automatically run security checks
Security Scoring:
- 100: No vulnerabilities detected
- 80: Low severity vulnerabilities only
- 60: Medium severity vulnerabilities
- 40: High severity vulnerabilities
- 0: Critical vulnerabilities found
π§ͺ Testing
# Run all tests
# Run with output
# Test specific functionality
π Scoring Algorithm
Overall Score Calculation
Overall Score = Average(Clippy Score, Rustc Score, Security Score, Coverage Score)
Component Scores
- Clippy Score:
100 - (warnings Γ 5)(minimum: 0) - Rustc Score:
100 - (errors Γ 10)(minimum: 0) - Security Score: Dynamic based on vulnerability severity
- Coverage Score: Based on test coverage percentage (target: 80%+)
Approval Threshold
- β Approved: Score β₯ 80
- β οΈ Needs Work: Score 60-79
- β Escalated: Score < 60 (auto-escalates to Tech Lead)
ποΈ Architecture
ReviewAgent
βββ run_clippy() β ClippyResult
βββ run_rustc_check() β RustcResult
βββ run_security_audit() β SecurityResult
βββ calculate_coverage() β CoverageResult
βββ generate_quality_report() β QualityReport
π Dependencies
- Core:
miyabi-agent-core,miyabi-types,miyabi-core - Runtime:
tokio,async-trait - Serialization:
serde,serde_json - Utilities:
chrono,regex,thiserror,tracing
π Related Crates
miyabi-agent-coordinator- Task orchestration and DAG planningmiyabi-agent-codegen- AI-powered code generationmiyabi-agent-pr- Pull request creation and managementmiyabi-types- Shared type definitionsmiyabi-agent-core- Base agent traits and utilities
π€ Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
π License
Licensed under the MIT License. See LICENSE for details.
π Version History
- v0.1.0 (2025-10-25): Initial release
- Clippy integration
- Rustc type checking
- Security scanning (cargo-audit)
- 100-point quality scoring
- Escalation logic
Part of the Miyabi Framework - Autonomous AI Development Platform