3 releases (1 stable)

new 1.1.0 Nov 3, 2025
1.0.0 Oct 15, 2025
0.1.1 Oct 18, 2025
0.1.0 Oct 18, 2025

#136 in Data structures

Download history 455/week @ 2025-10-15 132/week @ 2025-10-22

587 downloads per month
Used in 9 crates

Apache-2.0

305KB
6.5K SLoC

Miyabi Rust Crates

GitHub Release Rust License

Complete Rust implementation of the Miyabi autonomous development framework

Status: โœ… v1.0.0 Production Release - All 9 Phases Complete (100%)


๐Ÿ“Š Integration Status

๐Ÿ“ˆ ็ตฑๅˆ็Šถๆ…‹ใฎๅฏ่ฆ–ๅŒ–:

  • INTEGRATION_VISUALIZATION.md โญโญโญ - 25,000ๆ–‡ๅญ—ใฎ่ฉณ็ดฐ่งฃ่ชฌ
  • INTEGRATION_SUMMARY.md โญโญ - 9,000ๆ–‡ๅญ—ใฎใ‚ตใƒžใƒชใƒผ็‰ˆ
  • integration-diagram.puml - PlantUMLๅฝขๅผใฎใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๅ›ณ
  • Miyabi Crates Integration.png - 286KB PNGๅ›ณ๏ผˆ6ๅฑคใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃ๏ผ‰

็ตฑๅˆใƒกใƒˆใƒชใ‚ฏใ‚น:

  • โœ… ็ทใ‚ฏใƒฌใƒผใƒˆๆ•ฐ: 23 crates
  • โœ… ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๅฑค: 6ๅฑค๏ผˆFoundation โ†’ Application๏ผ‰
  • โœ… ๅพช็’ฐไพๅญ˜: ใชใ—
  • โœ… ใƒ“ใƒซใƒ‰ๆ™‚้–“: ~8ๅˆ†๏ผˆM1 Max, 32GB RAM๏ผ‰

๐Ÿ“ฆ Crates Overview

Crate Description Version crates.io Lines Tests Status
miyabi-types Core type definitions 1.0.0 Crates.io 1,200 149 โœ… 100%
miyabi-core Configuration, retry, logger, docs 1.0.0 Crates.io 1,100 57 โœ… 100%
miyabi-worktree Git worktree parallel execution 1.0.0 Crates.io 485 3 โœ… 100%
miyabi-github GitHub API integration (octocrab) 1.0.0 Crates.io 950 15 โœ… 100%
miyabi-agents 7 autonomous AI agents 1.0.0 Crates.io 5,477 110 โœ… 100%
miyabi-cli Command-line interface 1.0.0 Crates.io 1,700 13 โœ… 100%
miyabi-orchestrator Claude session control plane (WIP) 0.1.1 Crates.io โ€” โ€” ๐Ÿšง Planning
miyabi-knowledge Vector knowledge management 0.1.1 Crates.io 2,500 45 โœ… 100%

Additional Crates (15ๅ€‹):

  • Layer 2: miyabi-llm, miyabi-knowledge (includes potpie module)
  • Layer 3: miyabi-agent-core, miyabi-agent-integrations
  • Layer 4: miyabi-agent-coordinator, miyabi-agent-codegen, miyabi-agent-review, miyabi-agent-workflow, miyabi-agent-business
  • Layer 5: miyabi-mcp-server, miyabi-discord-mcp-server, miyabi-a2a, miyabi-webhook
  • Layer 6: miyabi-web-api, miyabi-benchmark

Total: 23 crates (after Phase 1-3 consolidation), ~13,412 lines, 392 tests (100% passing) โœ…

Note: Consolidated in v0.1.1:

  • miyabi-scheduler + miyabi-feedback-loop โ†’ miyabi-orchestrator
  • miyabi-potpie โ†’ miyabi-knowledge/potpie module
  • miyabi-business-agents โ†’ miyabi-agents/business module (deprecated)

Architecture

miyabi-cli (Binary)
    โ”‚
    โ”œโ”€โ”€ miyabi-agents (7 Agents)
    โ”‚   โ”œโ”€โ”€ CoordinatorAgent (1,014 lines, 20 tests)
    โ”‚   โ”œโ”€โ”€ CodeGenAgent (1,254 lines, 36 tests)
    โ”‚   โ”œโ”€โ”€ IssueAgent (558 lines, 12 tests)
    โ”‚   โ”œโ”€โ”€ PRAgent (496 lines, 12 tests)
    โ”‚   โ”œโ”€โ”€ ReviewAgent (840 lines, 12 tests)
    โ”‚   โ”œโ”€โ”€ DeploymentAgent (668 lines, 15 tests)
    โ”‚   โ””โ”€โ”€ RefresherAgent (625 lines, 10 tests)
    โ”‚
    โ”œโ”€โ”€ miyabi-github (GitHub API)
    โ”‚   โ”œโ”€โ”€ Issues API (list, create, update, labels)
    โ”‚   โ”œโ”€โ”€ Labels API (create, list, delete)
    โ”‚   โ””โ”€โ”€ Pull Requests API (create, merge, reviews)
    โ”‚
    โ”œโ”€โ”€ miyabi-worktree (Parallel Execution)
    โ”‚   โ”œโ”€โ”€ WorktreeManager (create, remove, merge)
    โ”‚   โ”œโ”€โ”€ Semaphore-based concurrency control
    โ”‚   โ””โ”€โ”€ Statistics tracking
    โ”‚
    โ”œโ”€โ”€ miyabi-core (Utilities)
    โ”‚   โ”œโ”€โ”€ Config (YAML/TOML/JSON + env vars)
    โ”‚   โ”œโ”€โ”€ Retry (exponential backoff)
    โ”‚   โ”œโ”€โ”€ Logger (tracing-based)
    โ”‚   โ””โ”€โ”€ Documentation (rustdoc + README generation)
    โ”‚
    โ”œโ”€โ”€ miyabi-knowledge (Knowledge Management)
    โ”‚   โ”œโ”€โ”€ Vector DB (Qdrant integration)
    โ”‚   โ”œโ”€โ”€ Embeddings (Ollama + OpenAI)
    โ”‚   โ”œโ”€โ”€ Log Collection (.ai/logs/ Markdown parsing)
    โ”‚   โ”œโ”€โ”€ Search (Vector similarity + metadata filters)
    โ”‚   โ””โ”€โ”€ CLI (search, stats, index commands)
    โ”‚
    โ””โ”€โ”€ miyabi-types (Type Definitions)
        โ”œโ”€โ”€ Agent types (AgentType, AgentResult, Metrics)
        โ”œโ”€โ”€ Task types (Task, DAG, TaskGroup)
        โ”œโ”€โ”€ Issue types (Issue, IssueState, PR)
        โ””โ”€โ”€ Workflow types (ExecutionReport, Progress)

Quick Start

Installation

# Clone repository
git clone https://github.com/ShunsukeHayashi/miyabi-private.git
cd miyabi-private

# Build all crates
cargo build --workspace

# Run tests (347 tests)
cargo test --workspace

# Build CLI binary
cargo build --release --bin miyabi

# Install CLI globally
cargo install --path crates/miyabi-cli

Basic Usage

# Initialize new project
miyabi init my-project

# Install to existing project
cd existing-project
miyabi install

# Check status
miyabi status

# Run agent (autonomous execution)
miyabi agent run coordinator --issue 270

# Knowledge management (vector search)
miyabi knowledge index miyabi-private        # Index workspace logs
miyabi knowledge search "error handling"     # Search knowledge base
miyabi knowledge stats                       # Show statistics

Agents

7 Autonomous AI Agents

1. CoordinatorAgent (1,014 lines)

  • Purpose: Issueๅˆ†ๆžใƒปTaskๅˆ†่งฃใƒปDAGๆง‹็ฏ‰
  • Features:
    • GitHub Issue fetching
    • Task decomposition with dependencies
    • DAG construction and cycle detection
    • Specialist agent assignment
  • Tests: 20 unit + integration tests

2. CodeGenAgent (1,254 lines)

  • Purpose: AI-driven code generation
  • Features:
    • Worktree-based parallel execution
    • EXECUTION_CONTEXT.md generation
    • .agent-context.json for Claude Code
    • Documentation generation (Rustdoc + README)
    • Retry with exponential backoff
  • Tests: 36 comprehensive tests

3. IssueAgent (558 lines)

  • Purpose: Issue analysis and label inference
  • Features:
    • AI-based type/priority/severity inference
    • Automatic label assignment
    • Escalation detection
    • GitHub API integration
  • Tests: 12 unit tests

4. PRAgent (496 lines)

  • Purpose: Pull Request automation
  • Features:
    • Automatic PR creation
    • Conventional Commits compliance
    • Reviewer assignment
    • Draft PR support
  • Tests: 12 unit tests

5. ReviewAgent (840 lines)

  • Purpose: Code quality review
  • Features:
    • 100-point scoring system
    • Clippy + cargo check integration
    • Security scanning
    • Escalation on low scores
  • Tests: 12 unit tests

6. DeploymentAgent (668 lines)

  • Purpose: CI/CD automation
  • Features:
    • Build โ†’ Test โ†’ Deploy โ†’ Health Check โ†’ Rollback
    • Firebase/Vercel/AWS support
    • Retry (Staging: 5, Production: 10)
    • Escalation to CTO on production failures
  • Tests: 15 comprehensive tests

7. RefresherAgent (625 lines)

  • Purpose: Issue status monitoring
  • Features:
    • Implementation status checking (cargo build/test)
    • Automatic state label updates
    • Phase 3-5 tracking
    • Escalation on >100 updates
  • Tests: 10 unit tests

Development

Prerequisites

  • Rust: 1.75.0+ (2021 Edition)
  • Git: 2.30+
  • GitHub Token: For API access

Environment Variables

export GITHUB_TOKEN=ghp_xxx        # Required for GitHub API
export DEVICE_IDENTIFIER=MacBook   # Optional device ID
export ANTHROPIC_API_KEY=sk-xxx    # Optional for AI features

Build Profiles

# Development (optimized dependencies)
cargo build

# Release (full optimizations)
cargo build --release

# CLI binary
cargo build --release --bin miyabi

# All binaries
cargo build --release --workspace

Testing

# All tests (347 tests)
cargo test --workspace

# Unit tests only (327 tests)
cargo test --workspace --lib

# Integration tests only (20 tests)
cargo test --workspace --test '*'

# Specific crate
cargo test -p miyabi-agents

# With output
cargo test -- --nocapture

# Coverage (requires tarpaulin)
cargo tarpaulin --workspace --out Html

Code Quality

# Linting (strict mode)
cargo clippy --workspace -- -D warnings

# Format check
cargo fmt --check

# Documentation
cargo doc --workspace --no-deps --open

Performance

Rust vs TypeScript:

  • โœ… Execution time: 50%+ faster
  • โœ… Memory usage: 30%+ reduction
  • โœ… Binary size: 30MB (release)
  • โœ… Compilation: 3 minutes (full workspace)

Project Status

Completed Phases (9/9) โœ…

  • โœ… Phase 1-2: Planning & Design (100%)
  • โœ… Phase 3: Type Definitions (100% - 170 tests)
  • โœ… Phase 4: CLI Implementation (100% - 29 tests)
  • โœ… Phase 5: Agent Implementation (100% - 109 tests)
  • โœ… Phase 6: Worktree Management (100% - 3 tests)
  • โœ… Phase 7: GitHub Integration (100% - 15 tests)
  • โœ… Phase 8: Test Implementation (100% - 347 tests)
  • โœ… Phase 9: Documentation (100% - v1.0.0 Released)

Quality Metrics

Metric Target Achieved Status
Compilation 0 errors โœ… 0 errors โœ…
Tests All passing โœ… 347/347 (100%) โœ…
Clippy 0 warnings โœ… 0 warnings โœ…
Coverage 80%+ โœ… High coverage โœ…
Performance 50%+ faster โœ… Achieved โœ…

Documentation

  • Rustdoc: cargo doc --workspace --open
  • Examples: See crates/*/examples/
  • Integration Guide: docs/RUST_MIGRATION_REQUIREMENTS.md
  • API Reference: Generated by cargo doc

Contributing

# 1. Create feature branch
git checkout -b feature/my-feature

# 2. Make changes with tests
cargo test --workspace

# 3. Check code quality
cargo clippy -- -D warnings
cargo fmt

# 4. Commit (Conventional Commits)
git commit -m "feat(agents): add new feature"

# 5. Push and create PR
git push origin feature/my-feature

License

Apache-2.0


Miyabi Rust Edition - Production Ready ๐Ÿš€

Dependencies

~1.6โ€“2.9MB
~54K SLoC