## Example: Feature Development Workflow
### Workflow Definition
```yaml
workflow:
id: feature-development
name: Feature Development Workflow
version: "1.0"
description: "Standard workflow for developing a new feature"
type: generic
project_types:
- web-app
- mobile-app
- api
metadata:
elicit: true
confirmation_required: true
phases:
- phase_1: Planning
- phase_2: Story Creation
- phase_3: Implementation
- phase_4: Quality Assurance
- phase_5: Deployment
sequence:
# Phase 1: Planning
- step: create_prd
id: prd
phase: 1
agent: pm
action: Create product requirements document
creates: docs/prd/feature.md
optional: false
notes: |
Define the feature requirements, user stories, and success criteria.
Include technical constraints and dependencies.
next: validate_prd
- step: validate_prd
id: validate
phase: 1
agent: po
action: Validate PRD completeness and feasibility
requires: prd
optional: false
notes: |
Review PRD for:
- Clear acceptance criteria
- Technical feasibility
- Business value alignment
next: create_story
# Phase 2: Story Creation
- step: create_story
id: story
phase: 2
agent: sm
action: Create development story from PRD
requires: validate
creates: docs/stories/X.X-feature.yaml
optional: false
notes: |
Break down PRD into implementable story with:
- Clear acceptance criteria
- Task breakdown
- Testable requirements
next: validate_story
- step: validate_story
id: validate_story
phase: 2
agent: po
action: Validate story with 10-point checklist
requires: story
optional: false
next: implement
# Phase 3: Implementation
- step: implement
id: dev
phase: 3
agent: dev
action: Implement feature according to story
requires: validate_story
creates:
- src/**/*.js
- tests/**/*.test.js
optional: false
notes: |
Implement according to:
- Acceptance criteria
- Coding standards
- Test coverage requirements (80%+)
next: qa_review
# Phase 4: Quality Assurance
- step: qa_review
id: qa
phase: 4
agent: qa
action: Run quality gates and review implementation
requires: dev
optional: false
notes: |
Execute:
- Layer 1: Lint, typecheck, tests
- Layer 2: CodeRabbit, Quinn review
- Verify acceptance criteria met
next: push
# Phase 5: Deployment
- step: push
id: push
phase: 5
agent: devops
action: Push changes and create PR
requires: qa
optional: false
notes: |
- Commit with story reference
- Push to feature branch
- Create pull request
- Ensure CI passes
next: complete
- step: complete
id: complete
phase: 5
agent: po
action: Close story and update backlog
requires: push
optional: true
flow_diagram: |
```mermaid
graph TD
A[Start] --> B[@pm: Create PRD]
B --> C[@po: Validate PRD]
C --> D[@sm: Create Story]
D --> E[@po: Validate Story]
E --> F[@dev: Implement]
F --> G[@qa: Review]
G --> H[@devops: Push]
H --> I[@po: Close Story]
I --> J[Complete]