What problem does it solve?
This Skill provides a comprehensive guide and practical examples for implementing Agent-First Development (AFD) commands using Rust, ensuring robust command definition, error handling, and integration within the AFD ecosystem.
Core Features & Use Cases
- Command Definition: Learn to define commands with parameters, schemas, and handlers using the
afd crate.
- Error Handling: Implement sophisticated error management with custom error codes, suggestions, and retry logic using
CommandResult and CommandError.
- Registry & Execution: Understand how to build and manage a
CommandRegistry for command discovery and execution, including batch and streaming operations.
- Metadata & Testing: Utilize metadata types for richer command feedback and implement unit and async tests for reliability.
- Use Case: You are building a new microservice in Rust that needs to expose capabilities as AFD commands. This Skill will guide you through defining your commands, handling various success and failure scenarios, and ensuring your commands are discoverable and testable.
Quick Start
Use the afd-rust skill to see an example of defining a new command using the CommandHandler trait.