Overview
Workflows in AIOX are prescribed sequences of steps and agent interactions for specific project types and development scenarios. They act as strategic guides for users and orchestrating agents.Workflow Philosophy
Workflows define the “what” and “when” of agent collaboration, ensuring consistent, high-quality execution of complex processes.
Workflow Architecture
Workflows are defined in YAML format and stored in.aiox-core/development/workflows/:
Available Workflows
Development Workflows
- Greenfield
- Brownfield
- Configuration
New Projects Starting from Scratch
greenfield-fullstack.yaml
greenfield-fullstack.yaml
Complete full-stack application developmentPhases:
- Project ideation and market research
- PRD creation
- Architecture design
- UI/UX specification
- Database schema design
- Backend implementation
- Frontend implementation
- Integration and testing
- Deployment
greenfield-service.yaml
greenfield-service.yaml
Backend service/API developmentPhases:
- Service requirements
- API design
- Database schema
- Implementation
- Testing
- Deployment
greenfield-ui.yaml
greenfield-ui.yaml
Frontend/UI application developmentPhases:
- UX research
- Wireframing
- Design system definition
- Component implementation
- Integration
- Testing
- Deployment
Workflow Patterns
Common workflow sequences are defined in.aiox-core/data/workflow-patterns.yaml:
Story Development Cycle (Primary)
Most Common Workflow
Complete story lifecycle from validation to deployment
validate-story-draftdevelop/develop-yolo/develop-interactivereview-qapre-push-quality-gategithub-pr-automation
- Story status: “Ready for Review”
- All tests passing
- PR created and merged
Epic Creation Workflow
Planning & Organization
Create and organize epics with initial stories
QA Loop (Iterative Review)
Automated Review-Fix Cycle
Continues until code meets quality standards (max 5 iterations)
Database Development Workflow
Schema Design & Migration
Safe, validated database changes
db-domain-modeling- Design schemadb-schema-audit- Audit for best practicesdb-dry-run- Test migration safelydb-apply-migration- Execute migrationdb-rls-audit- Validate security policies
Workflow Intelligence
AIOX includes sophisticated workflow detection and suggestion systems:Pattern-Based Detection
Context-Aware Suggestions
Agents detect workflow context from command history and suggest next steps.
Example:
User executed:
aiox sm draftaiox po validate-story-draft story-1.2.3
State-Based Workflows
File-Based State Persistence
Workflows can maintain state across sessions using YAML files in
.aiox/.aiox/{instance-id}-state.yaml
State File Schema:
*run-workflow {name} start- Create state file, begin workflow*run-workflow {name} continue- Resume from last checkpoint*run-workflow {name} status- Show progress*run-workflow {name} skip- Skip optional step*run-workflow {name} abort- Abort workflow (preserves state)
- Session continuity across restarts
- Progress tracking
- Resume capability
- Handoff support
Workflow Chains
Defined in.aiox-core/data/workflow-chains.yaml, chains specify exact command sequences:
- Checks
.aiox/handoffs/for unconsumed handoff - Reads
from_agentandlast_command - Looks up position in workflow chain
- Suggests next command with alternatives
Bob Orchestration (Epic-Level)
@pm (Bob) Multi-Agent Coordination
Bob orchestrates complete epic execution across multiple agents and stories.
Epic Execution Workflow
Key Commands:*execute-epic {epic-id}- Start epic orchestration*assign-executor- Assign appropriate agent to story*wave-execute- Execute parallel story wave*build-status --all- Check all story build statuses
*waves command:
- Maximize parallelism
- Respect dependencies
- Optimize team velocity
- Clear progress tracking
Cross-Agent Handoff Workflow
Seamless Agent Transitions
Agents create handoff artifacts to maintain context across transitions.
Handoff Artifact Structure
Location:.aiox/handoffs/{workflow-id}-{timestamp}.yaml
Handoff Lifecycle
Example:
@dev completes story → Creates handoff to @qa
@qa activates → Greeting shows:
Hybrid Workflows (Cross-Context)
Squad + Core Agent Workflows
Workflows can use agents from both core AIOX context AND squad-specific contexts.
Resolution Rules
Order: Squad-first, core-fallbackExplicit Prefix
Avoid ambiguity with explicit context prefix:squads/{squad_name}/workflows/
Workflow Orchestration with @aiox-master
High-Level Workflow Guidance
@aiox-master uses workflow definitions to guide users through complete processes.
- Workflow selection based on project type
- Step-by-step guidance
- Agent coordination
- Environment transition management (web UI → IDE)
- Progress tracking
Best Practices
Workflow Selection
- Match workflow to project type (greenfield vs. brownfield)
- Use discovery workflows for legacy codebases
- Follow recommended agent sequences
Workflow Execution
- Complete each phase before moving to next
- Respect phase dependencies
- Use appropriate environment (web UI vs. IDE)
- Track progress via state files
Agent Coordination
- Follow workflow-specified agent sequences
- Respect agent authority boundaries
- Use handoff artifacts for context continuity
- Leverage Bob for multi-agent orchestration
Workflow Customization
- Create squad-specific workflows when needed
- Use hybrid workflows for specialized agents
- Document custom workflow patterns
- Version control workflow definitions
Summary
Workflow System Principles
Prescribed Sequences: Clear step-by-step processes for complex tasksAgent Coordination: Multi-agent collaboration patternsState Management: Persist progress across sessionsContext Detection: Intelligent next-step suggestionsFlexibility: Hybrid workflows support custom agentsOrchestration: High-level coordination via @pm and @aiox-master
Next Steps
Agent System
Learn about agents that execute workflows
Story-Driven Development
Understand the story workflow pattern
Using Workflows
Practical guide to executing workflows
Creating Custom Workflows
Build your own workflow definitions