miyabi-modes 0.1.2

Complete autonomous AI development operations platform - Rust edition
Documentation

Adaptive mode system for Miyabi - inspired by Roo-Code

This crate provides a flexible mode system that allows users to define custom AI agent behaviors through YAML configuration files, similar to Roo-Code's .roomodes system.

Architecture

  • MiyabiMode: Core mode definition with role, tools, and instructions
  • ModeLoader: Loads modes from .miyabi/modes/ directory
  • ModeRegistry: Thread-safe registry for managing modes
  • ModeValidator: Validates mode definitions

Example Usage

use miyabi_modes::{ModeLoader, ModeRegistry};
use std::path::Path;

# fn example() -> Result<(), Box<dyn std::error::Error>> {
let loader = ModeLoader::new(Path::new("."));
let registry = ModeRegistry::new();

// Load all modes
let modes = loader.load_all()?;
registry.register_all(modes)?;

// Get a specific mode
if let Some(mode) = registry.get("codegen") {
    println!("Found mode: {} ({})", mode.name, mode.character);
}
# Ok(())
# }