Level 3: Standard Workflows
Complexity: Medium-High | Artifacts: Persistent session files | State: Full session management
Level 3 workflows provide complete planning with persistent session management. They're designed for multi-module changes that require traceability, verification, and structured execution.
Overview
Included Workflows
| Workflow | Purpose | Phases | Artifact Location |
|---|---|---|---|
plan | Complex feature development | 5 phases | .workflow/active/{session}/ |
tdd-plan | Test-driven development | 6 phases | .workflow/active/{session}/ |
test-fix-gen | Test fix generation | 5 phases | .workflow/active/WFS-test-{session}/ |
Common Characteristics
| Property | Value |
|---|---|
| Complexity | Medium-High |
| Artifacts | Persistent files (.workflow/active/{session}/) |
| State | Full session management |
| Verification | Built-in verification steps |
| Execution | /workflow:execute |
| Use Case | Multi-module, traceable tasks |
Workflow 1: plan -> verify -> execute
5-phase complete planning workflow
Command
/workflow:plan "Implement OAuth2 authentication system"
/workflow:plan-verify # Verify plan (recommended)
/workflow:execute
/workflow:review # (optional) Review
Flow Diagram
Process Phases
Phase 1: Session Discovery
/workflow:session:start --auto "Implement OAuth2 authentication system"
- Creates or discovers workflow session
- Returns:
sessionId
Phase 2: Context Gathering
/workflow:tools:context-gather
- Analyzes codebase structure
- Identifies tech stack and patterns
- Returns:
context-package.json+conflict_risk
Phase 3: Conflict Resolution (Conditional)
# Only if conflict_risk >= medium
/workflow:tools:conflict-resolution
- Detects potential conflicts
- Resolves dependency issues
- Ensures clean execution path
Phase 4: Task Generation
/workflow:tools:task-generate-agent
- Generates structured tasks
- Creates dependency graph
- Returns:
IMPL_PLAN.md+IMPL-*.json+TODO_LIST.md
Artifacts
Location: .workflow/active/{WFS-session}/
.workflow/active/WFS-oauth2-auth-2025-02-03/
├── workflow-session.json # Session metadata
├── IMPL_PLAN.md # Implementation plan
├── TODO_LIST.md # Progress tracking
├── .task/
│ ├── IMPL-001.json # Main task
│ ├── IMPL-002.json
│ └── ...
└── .process/
├── context-package.json # Project context
├─ ─ conflict-resolution.json # Conflict analysis
└── planning-notes.md
Use Cases
- Multi-module changes
- Refactoring
- Dependency analysis needed
Workflow 2: tdd-plan -> execute -> tdd-verify
6-phase test-driven development workflow
Command
/workflow:tdd-plan "Implement user registration with TDD"
/workflow:execute # Follow Red-Green-Refactor
/workflow:tdd-verify # Verify TDD compliance
Flow Diagram
Process Phases
Phase 1: Session Discovery
/workflow:session:start --type tdd --auto "TDD: User Registration"
TDD Structured Format:
TDD: [Feature Name]
GOAL: [Objective]
SCOPE: [Included/excluded]
CONTEXT: [Background]
TEST_FOCUS: [Test scenarios]
Phase 2: Context Gathering
/workflow:tools:context-gather
Phase 3: Test Coverage Analysis
/workflow:tools:test-context-gather
- Detect test framework
- Analyze existing test coverage
- Identify coverage gaps
Phase 4: Conflict Resolution (Conditional)
# Only if conflict_risk >= medium
/workflow:tools:conflict-resolution
Phase 5: TDD Task Generation
/workflow:tools:task-generate-tdd
- Generate IMPL tasks with built-in Red-Green-Refactor cycles
meta.tdd_workflow: trueflow_control.implementation_approachcontains 3 steps (red/green/refactor)
Phase 6: TDD Structure Validation
- Verify TDD structure compliance
TDD Task Structure
{
"id": "IMPL-001",
"title": "Implement user registration",
"meta": {
"tdd_workflow": true
},
"flow_control": {
"implementation_approach": [
{
"step": 1,
"title": "Red: Write failing test",
"description": "Write test that fails"
},
{
"step": 2,
"title": "Green: Make test pass",
"description": "Implement minimal code to pass",
"test_fix_cycle": {
"max_iterations": 3,
"pass_threshold": 0.95
}
},
{
"step": 3,
"title": "Refactor: Improve code",
"description": "Refactor while keeping tests green"
}
]
}
}
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Enforcement Method:
- Phase 5:
implementation_approachincludes test-first steps (Red -> Green -> Refactor) - Green phase: Includes test-fix-cycle configuration (max 3 iterations)
- Auto-revert: Triggered when max iterations reached without passing tests
Why Order Matters:
- Tests written after code pass immediately -> proves nothing
- Test-first forces edge case discovery before implementation
- Tests-after verify what was built, not what's required
Use Cases
- Test-driven development
- High-quality feature requirements
- Critical system components
Workflow 3: test-fix-gen -> test-cycle-execute
5-phase test fix generation workflow
Command
# Session Mode
/workflow:test-fix-gen WFS-user-auth-v2
/workflow:test-cycle-execute
# Prompt Mode
/workflow:test-fix-gen "Test the auth API"
/workflow:test-cycle-execute
Flow Diagram
Process Phases
Phase 1: Create/Use Test Session
Session Mode (uses existing session):
/workflow:session:start --type test --resume WFS-user-auth-v2
Prompt Mode (creates new session):
/workflow:session:start --type test --new
Phase 2: Gather Test Context
/workflow:tools:test-context-gather
Phase 3: Test Generation Analysis
/workflow:tools:test-concept-enhanced
- Multi-layer test requirements:
- L0: Static - Type checking, linting
- L1: Unit - Function-level tests
- L2: Integration - Component interaction
- L3: E2E - Full system tests
Phase 4: Generate Test Tasks
/workflow:tools:test-task-generate
IMPL-001.json: Test understanding & generationIMPL-001.5-review.json: Quality gateIMPL-002.json: Test execution & fix cycle
Phase 5: Return Summary
- ->
/workflow:test-cycle-execute
Dual-Mode Support
| Mode | Input Pattern | Context Source |
|---|---|---|
| Session Mode | WFS-xxx | Source session summaries |
| Prompt Mode | Text/file path | Direct codebase analysis |
Artifacts
Location: .workflow/active/WFS-test-{session}/
.workflow/active/WFS-test-user-auth-2025-02-03/
├── workflow-session.json
├── .task/
│ ├── IMPL-001.json # Test understanding & generation
│ ├── IMPL-001.5-review.json # Quality gate
│ └── IMPL-002.json # Test execution & fix cycle
└── .process/
├── TEST_ANALYSIS_RESULTS.md
└── test-context-package.json
Use Cases
- Test failure fixes
- Coverage improvement
- Test suite generation
Level 3 Comparison Table
| Aspect | plan | tdd-plan | test-fix-gen |
|---|---|---|---|
| Purpose | Complex features | Test-driven dev | Test fixes |
| Phases | 5 | 6 | 5 |
| TDD | No | Yes (Red-Green-Refactor) | Optional |
| Artifacts | .workflow/active/ | .workflow/active/ | .workflow/active/WFS-test-*/ |
| Verification | plan-verify | tdd-verify | Built-in quality gate |
| Best For | Multi-module changes | High-quality features | Test improvements |
Execution: execute
All Level 3 workflows execute via execute:
/workflow:execute --session WFS-{session-id}
Key Features
- Dependency analysis - Automatic task dependency resolution
- Parallel execution - Independent tasks run in parallel
- Progress tracking - Session-based TODO updates
- Summaries - Task completion summaries for dependent tasks
Related Workflows
- Level 2: Rapid - Simpler workflow
- Level 4: Brainstorm - Multi-role exploration
- Level 5: Intelligent - Automated orchestration
- FAQ - Common questions