How maddenp/iotaa works
Key Components to Include in the System Design:
Core Workflow Engine Components
• Task Decorators (@task, @tasks, @external)
• Asset Management System
• Workflow Execution Engine
• State Management
• CLI Interface
Main Architectural Patterns
• Decorator Pattern (for task definitions)
• Generator Pattern (for workflow control flow)
• Observer Pattern (for asset state monitoring)
High-Level Components
• [CLI Interface] → [Workflow Engine Core] → [Task Execution System]
• ↓
• [Asset Manager]
Detail the Core Components
a. Task Management Layer:
• [@task Decorator] → [Task Definition]
• [@tasks Decorator] → [Task Collection]
• [@external Decorator] → [External Dependencies]
b. Asset Management Layer:
• [Asset Class] → [Reference Management]
• → [State Monitoring]
• → [Readiness Checks]
c. Execution Flow:
• [Task Validation] → [Dependency Resolution] → [State Verification]
• → [Task Execution]
Features
• Dry-run capability
• Graph generation
• Logging system
• CLI interface
Important Relationships
• [Task] ←→ [Asset]
• [Asset] → [State Check]
• [Workflow] → [Dependency Graph]
Design Guidelines:
Generator-based Control Flow
• Three-step yield process
• Task state transitions
• Demonstrate dependency resolution
Asset Management
• Reference handling
• Readiness checking
• State monitoring
Task Hierarchy
• Regular tasks
• Task collections
• External dependencies
Support Systems
• Logging framework
• CLI parser
• Graph generation
Integration Points
• External task integration
• File system interaction
• User interface
Key Considerations:
Bottom Layer: Task/Asset Management
• Blue: Core system components
• Green: Active/Ready states
• Orange: Pending/Not Ready states
• Gray: External components/dependencies
• State indicators
This design should capture the essential aspects of the workflow engine while maintaining clarity and showing the relationships between components. The emphasis should be on the generator-based control flow and asset management, as these are the key distinguishing features of this implementation.