/workflow
Run parameterized workflow templates. Enables DRY patterns for common multi-step operations.
Quick Start
/agileflow:workflow review path=src/auth.ts focus=securityThis runs the built-in code review workflow on the specified file.
Parameters
| Parameter | Required | Description |
|---|---|---|
<template> | Yes | Workflow name (built-in or custom) |
[arguments] | No | Key=value pairs for template variables |
Built-in Workflows
review
Review code with configurable focus.
Arguments:
path(required): File or glob pattern to reviewfocus(optional):security,performance,quality, orall(default: all)
Example:
/agileflow:workflow review path=src/auth.ts focus=securityWhat it does:
- Reads the target file(s)
- Analyzes for specified focus areas
- Generates findings with severity
- Suggests fixes
test-feature
Test a feature end-to-end.
Arguments:
feature(required): Feature name or pathcoverage(optional): Minimum coverage threshold (default: 80)
Example:
/agileflow:workflow test-feature feature=user-auth coverage=90What it does:
- Identifies test files for feature
- Runs existing tests
- Generates missing tests
- Verifies coverage meets threshold
implement
Implement a story or feature.
Arguments:
story(required): Story ID or descriptionmode(optional):quick,thorough, ortdd(default: thorough)
Example:
/agileflow:workflow implement story=US-0042 mode=tddModes:
- quick: Minimal implementation, basic tests, quick review
- thorough: Full planning, comprehensive tests, code review, documentation
- tdd: Write tests first, implement, refactor, verify coverage
analyze
Analyze codebase for issues.
Arguments:
target(required): Path or glob patterntype(required):security,performance,complexity, orall
Example:
/agileflow:workflow analyze target=src/**/*.ts type=allWhat it does:
- Gathers files matching pattern
- Runs analysis for specified type
- Generates report with findings
- Prioritizes by severity
Custom Workflows
Create custom workflows in docs/08-project/workflows/:
docs/08-project/workflows/
├── deploy-staging.md
├── release-check.md
└── onboard-feature.mdCustom Workflow Format
---
name: deploy-staging
description: Deploy to staging environment
arguments:
- name: version
required: true
description: Version to deploy
- name: notify
required: false
default: true
description: Send Slack notification
---
# Deploy to Staging: {{version}}
## Pre-checks
1. Verify tests passing
2. Check no blocking PRs
## Deployment
1. Build version {{version}}
2. Deploy to staging cluster
3. Run smoke tests
## Post-deploy
{{#if notify}}
4. Send Slack notification
{{/if}}Using Custom Workflows
/agileflow:workflow deploy-staging version=2.42.0 notify=falseTemplate Syntax
Variable Substitution
Version: {{version}}Default Values
Coverage threshold: {{coverage:80}}%
Mode: {{mode:thorough}}Conditional Sections
{{#if verbose}}
### Verbose Output
Show detailed logs...
{{/if}}Lists
Files to process:
{{#each files}}
- {{this}}
{{/each}}Workflow Discovery
List available workflows:
/agileflow:workflow --listOutput:
📋 Available Workflows
══════════════════════════════════════════════════════════════
Built-in workflows:
• review Code review with configurable focus
• test-feature Test a feature end-to-end
• implement Implement a story/feature
• analyze Analyze codebase for issues
Custom workflows (docs/08-project/workflows/):
• deploy-staging Deploy to staging environment
• release-check Pre-release checklist
Usage: /agileflow:workflow <name> [args...]
Usage Examples
Code Review
/agileflow:workflow review path=src/api/auth.ts focus=securityPerforms security-focused review of auth module.
Test Coverage
/agileflow:workflow test-feature feature=user-auth coverage=90Tests user auth feature with 90% coverage requirement.
TDD Implementation
/agileflow:workflow implement story=US-0042 mode=tddImplements story using test-driven development approach.
Full Analysis
/agileflow:workflow analyze target=src/**/*.ts type=allAnalyzes all TypeScript files for security, performance, and complexity issues.
Composition
Workflows can reference other workflows:
## Full Release
1. /agileflow:workflow test-feature feature=all coverage=90
2. /agileflow:workflow analyze target=src type=security
3. /agileflow:workflow deploy-staging version={{version}}Output Format
Workflow Execution
🔄 Workflow: review
══════════════════════════════════════════════════════════════
Arguments:
• path: src/auth.ts
• focus: security
Executing workflow steps...
Step 1: Reading target file(s)
✓ Read src/auth.ts (245 lines)
Step 2: Spawning security expert
✓ agileflow-security analyzing...
Step 3: Generating findings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Review Results
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Security Analysis: src/auth.ts
🔴 HIGH: Hardcoded JWT secret (line 42)
Suggestion: Use environment variable
🟡 MEDIUM: No rate limiting on login endpoint
Suggestion: Add rate limiter middleware
🟢 LOW: Console.log in production code (line 87)
Suggestion: Remove or use proper logging
Summary: 1 high, 1 medium, 1 low severity issues
Workflow List
📋 Available Workflows
══════════════════════════════════════════════════════════════
Built-in workflows:
• review Code review with configurable focus
• test-feature Test a feature end-to-end
• implement Implement a story/feature
• analyze Analyze codebase for issues
Custom workflows (docs/08-project/workflows/):
• deploy-staging Deploy to staging environment
• release-check Pre-release checklist
Usage: /agileflow:workflow <name> [args...]
Error Handling
Unknown Workflow
❌ Workflow not found: my-workflow
Available workflows:
• review
• test-feature
• implement
• analyze
Create custom workflow:
docs/08-project/workflows/my-workflow.md
Missing Required Argument
❌ Missing required argument: path
Workflow 'review' requires:
• path (required): File or glob pattern to review
• focus (optional): Review focus (default: all)
Usage: /agileflow:workflow review path=src/auth.ts focus=security
Best Practices
- Use descriptive names -
deploy-stagingnotds - Document arguments - Include types and defaults
- Keep workflows focused - One purpose per workflow
- Use composition - Build complex flows from simple ones
- Version workflows - Track changes in git
When to Use
Best For
- Repeated operations - DRY patterns for common tasks
- Multi-step processes - Automate complex workflows
- Team standards - Consistent process across team
- Documentation - Workflows serve as living docs
Not For
- One-off tasks - Use direct commands instead
- Exploratory work - Use individual commands for learning
Related Commands
On This Page
/workflowQuick StartParametersBuilt-in Workflowsreviewtest-featureimplementanalyzeCustom WorkflowsCustom Workflow FormatUsing Custom WorkflowsTemplate SyntaxVariable SubstitutionDefault ValuesConditional SectionsListsWorkflow DiscoveryUsage ExamplesCode ReviewTest CoverageTDD ImplementationFull AnalysisCompositionOutput FormatWorkflow ExecutionWorkflow ListError HandlingUnknown WorkflowMissing Required ArgumentBest PracticesWhen to UseBest ForNot ForRelated Commands