| Crates.io | miyabi-agent-issue |
| lib.rs | miyabi-agent-issue |
| version | 0.1.2 |
| created_at | 2025-11-22 09:20:11.746788+00 |
| updated_at | 2025-11-22 09:20:11.746788+00 |
| description | Complete autonomous AI development operations platform - Rust edition |
| homepage | https://github.com/ShunsukeHayashi/Miyabi |
| repository | https://github.com/ShunsukeHayashi/Miyabi |
| max_upload_size | |
| id | 1945099 |
| size | 131,084 |
Status: Stable | Category: Agent
IssueAgent (みつけるん) - W1: Issue Triage & Label Management Agent. Analyzes GitHub Issues to infer appropriate labels, estimate complexity, and provide implementation guidance.
IssueAgent is the first agent in the Miyabi workflow (W1), responsible for:
This agent implements the Issue Triage workflow defined in 組織設計原則57ラベル体系.
kind/, priority/, status/, area/, complexity/, effort/, impact/, risk/, workflow/, epic/, meta/Add to your Cargo.toml:
[dependencies]
miyabi-agent-issue = "0.1.0"
miyabi-agent-core = "0.1.0"
miyabi-types = "0.1.0"
Or use cargo add:
cargo add miyabi-agent-issue
use miyabi_agent_issue::{IssueAgent, ComplexityLevel, IssueAnalysis};
use miyabi_agent_core::BaseAgent;
use miyabi_types::{AgentConfig, Task};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize IssueAgent
let config = AgentConfig::default();
let agent = IssueAgent::new(config);
// Create task from GitHub Issue
let task = Task {
id: "270".to_string(),
title: "Implement user authentication".to_string(),
body: Some("Add JWT-based authentication with refresh tokens".to_string()),
labels: vec![],
..Default::default()
};
// Execute analysis
let result = agent.execute(&task).await?;
let analysis: IssueAnalysis = serde_json::from_str(&result.data)?;
// Access analysis results
println!("Complexity: {:?}", analysis.complexity);
println!("Suggested labels: {:?}", analysis.suggested_labels);
println!("Effort estimate: {}", analysis.effort_estimate);
Ok(())
}
# Analyze a single issue
miyabi agent issue --issue 270
# Batch analysis
miyabi agent issue --issues 270,271,272
# With custom GitHub repository
miyabi agent issue --issue 270 --repo owner/repo
pub struct IssueAnalysis {
/// Complexity level (Trivial to Very Complex)
pub complexity: ComplexityLevel,
/// Suggested labels from 57-label system
pub suggested_labels: Vec<String>,
/// Effort estimate (e.g., "2-4 hours", "1-2 days")
pub effort_estimate: String,
/// Implementation guidance
pub guidance: Vec<String>,
/// Detected dependencies
pub dependencies: Vec<String>,
/// Risk factors
pub risks: Vec<String>,
/// Suggested task decomposition
pub subtasks: Option<Vec<String>>,
}
miyabi-agent-issue
├── agent.rs # IssueAgent implementation (BaseAgent trait)
├── analysis.rs # IssueAnalysis types and complexity logic
└── lib.rs # Public API
Dependencies:
├── miyabi-agent-core # BaseAgent trait
├── miyabi-types # Task, AgentConfig, Result types
├── miyabi-core # Utilities
├── serde/serde_json # Serialization
├── tokio # Async runtime
└── chrono # Date/time handling
# All tests
cargo test -p miyabi-agent-issue
# Integration tests only
cargo test -p miyabi-agent-issue --test '*'
# With output
cargo test -p miyabi-agent-issue -- --nocapture
cargo tarpaulin --package miyabi-agent-issue
#[tokio::test]
async fn test_issue_analysis_complexity() {
let config = AgentConfig::default();
let agent = IssueAgent::new(config);
let task = Task {
id: "test-270".to_string(),
title: "Add simple logging".to_string(),
body: Some("Use tracing crate for logging".to_string()),
..Default::default()
};
let result = agent.execute(&task).await.unwrap();
let analysis: IssueAnalysis = serde_json::from_str(&result.data).unwrap();
assert_eq!(analysis.complexity, ComplexityLevel::Simple);
assert!(analysis.suggested_labels.contains(&"kind/enhancement".to_string()));
}
See CONTRIBUTING.md for development guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.