A structured framework for developing software features through coordinated agent collaboration, architectural analysis, and systematic implementation.
OpenCode provides two workflow types for different development needs:
- Task Creation (
/auto_task
) - Create structured task files from discussions - Planning (
/auto_plan
) - Generate comprehensive development plans with architectural analysis - Orchestration (
/orch
) - Execute the plan using coordinated agents
- Feature Creation (
/auto_feature
) - Create feature specification and architecture - Feature Decomposition (
/feature_decompose
) - Break feature into implementable tasks - Task Planning (
/auto_plan
) - Create detailed plans for each task - Orchestration (
/orch
) - Execute each task plan
See FEATURE_WORKFLOW.md for detailed feature workflow documentation.
Creates a structured task file based on discussion context, transforming conversation into actionable development requirements.
/auto_task [additional suggestions and ideas]
- Task ID Generation: Finds the highest numbered file in
./.task/
directory and adds 10 - File Naming: Creates
{new-task-id}-{short-task-title}.md
using kebab-case (max 7 words) - Content Structure:
- User feedback from discussion
- Problem Statement
- Requirements
- Expected Outcome
- Additional suggestions (from arguments)
- Other important agreements (architectural decisions, direction, project context)
- Task file in
./.task/
directory - Clear file path confirmation
After discussing authentication improvements:
/auto_task "Consider OAuth2 integration and multi-factor authentication"
Creates: ./.task/0030-user-authentication-system.md
Generates comprehensive development plans with architectural analysis and implementation details.
/auto_plan ./.task/[filename].md @architect @sonnet
- Purpose: Validate input and extract context for all agents
- Activities:
- Validate task file exists
- Extract filename components and set file paths
- Read and summarize task file (max 300 tokens)
- Extract feature architecture summary if exists (max 400 tokens)
- Prepare inline context for all subsequent phases
- Reliability: Clear error handling and termination conditions
- Agent:
architect
- Retry Limit: 3 attempts
- Input: Inline context + task file reference
- Output:
./.plan/arch_[basename].md
- Activities:
- Targeted web research (when needed)
- Task-specific architecture patterns
- Integration approach if dependencies exist
- Reliability: Automatic retry with clear failure handling
- Agent: First specified agent (
@agent_1
) - Retry Limit: 3 attempts
- Input: Inline context + architectural analysis
- Output:
./.plan/[filename].md
- Activities:
- Component details and data structures
- API design following architectural patterns
- Integration strategy with prior tasks
- Testing strategy
- Development phases
- Reliability: Automatic retry with clear failure handling
- Agent: Second specified agent (
@agent_2
) - Scoring System:
- Implementation Feasibility (40%)
- Architectural Alignment (30%)
- Completeness (20%)
- Integration Quality (10%)
- Decision Logic: 90%+ = PASS, <90% = NEEDS REFINEMENT
- Activities:
- Read architectural analysis and implementation plan
- Provide detailed percentage-based feedback
- Generate specific improvement recommendations
- Output: Overall score + detailed breakdown + feedback
- Trigger: Overall score < 90%
- Maximum Iterations: 3 total
- Process:
- Categorize issues (architectural vs implementation)
- Spawn appropriate agents (@agent_2 for architectural, @agent_1 for implementation)
- Use actual review feedback (not placeholders)
- Re-evaluate until 90%+ achieved or max iterations reached
- Reliability: Clear iteration limits and graceful completion
- Trigger: 90%+ score OR max refinement iterations reached
- Output: Comprehensive summary with quality metrics
- Quality Metrics:
- Final overall score with detailed breakdown
- Iteration counts and improvement tracking
- File paths and architectural decisions summary
./.plan/arch_[filename].md
- Architectural analysis./.plan/[filename].md
- Implementation plan
- Retry Limits: 3 attempts per phase with clear failure handling
- Linear Flow: Predictable Phase 0β1β2β3β4β5 progression
- No Infinite Loops: Eliminated "repeat till file exists" patterns
- Proper Variable Substitution: Real feedback content instead of placeholders
- Graceful Degradation: Best effort completion when limits reached
/auto_plan ./.task/110-jwt-token-service.md @architect @sonnet
Executes the development plan using coordinated agents with quality validation.
/orch ./.task/[filename].md ./.plan/[filename].md grok sonnet
- Purpose: Validate input and extract context for all agents
- Activities:
- Read and summarize task file (max 300 tokens)
- Read and summarize plan file (max 400 tokens)
- Prepare inline context for all phases
- Agent: First specified agent (
grok
) - Input: Inline context (task + plan summary)
- Activities:
- Implement exactly as specified in plan summary
- Track modified files for incremental review
- No deviations or extra features
- No commits (code changes only)
- Agent: Second specified agent (
sonnet
) - Input: Inline context + git diff of modified files only
- Evaluation Criteria:
- Plan compliance (how many items implemented)
- Approach adherence (follows plan's methodology)
- Code quality and best practices
- Security and performance considerations
- Test coverage (if applicable)
Scoring System:
- 90-100%: Excellent execution, minor/no deviations
- 70-89%: Good execution with some issues
- 50-69%: Significant deviations or incomplete work
- <50%: Major failure to follow plan
- Trigger: Score < 90%
- Process:
- Extract specific issues from review
- First agent fixes only identified issues (with inline context)
- Update modified files list
- Second agent re-reviews (only changed files)
- Repeat until 90%+ compliance
- Output: Final summary with compliance score and implementation details
- No commits: User decides when to commit changes
/orch ./.task/0030-user-authentication-system.md ./.plan/0030-user-authentication-system.md grok sonnet
# 1. Create task from discussion
/auto_task "Add OAuth2 support and consider security best practices"
# Output: ./.task/0030-user-authentication-system.md
# 2. Generate plan with architecture
/auto_plan ./.task/0030-user-authentication-system.md @architect @sonnet
# Output:
# - ./.plan/arch_0030-user-authentication-system.md
# - ./.plan/0030-user-authentication-system.md
# 3. Execute plan
/orch ./.task/0030-user-authentication-system.md ./.plan/0030-user-authentication-system.md grok sonnet
# Output: Implemented code changes (not committed)
# 1. Create feature with architecture
/auto_feature Implement user authentication system with JWT and OAuth2
# 2. Decompose into tasks
/feature_decompose ./.feature/100-user-authentication-system.md
# 3. Plan each task
/auto_plan ./.task/100_1_10-jwt-service.md @architect @sonnet
/auto_plan ./.task/100_1_20-oauth2-integration.md @architect @sonnet
# 4. Execute each task
/orch ./.task/100_1_10-jwt-service.md ./.plan/100_1_10-jwt-service.md grok sonnet
- grok: General coding and planning
- sonnet: General coding and planning
- supernova: General coding and planning
- qwen3: General coding and planning
- architect: Architectural guidance and design decisions
- security-auditor: Security audits and vulnerability identification
- review: Code quality and best practices review
- Structured Process: Clear separation between planning and execution
- Quality Assurance: Percentage-based validation ensures high-quality output
- Architectural Integrity: Research-backed architectural decisions
- Iterative Improvement: Automatic refinement until 90%+ quality achieved
- Traceability: Clear documentation trail from task to implementation
- Separation of Concerns: Architecture, planning, and implementation are handled separately
- Reliability: Retry limits, error handling, and no infinite loops π‘οΈ
- Flexibility: Dynamic agent selection with customizable combinations
- Task Creation: Be specific about requirements and include architectural considerations
- Agent Selection: Use different agents for planning (@agent_1) and review (@agent_2) to get diverse perspectives
- Quality Standards: The 90% score threshold ensures high-quality deliverables
- Documentation: Each stage produces comprehensive documentation for future reference
- No Premature Commits: Review all changes before committing to maintain code quality
- Feature vs Task: Use feature workflow for complex projects with 3+ related tasks
- Error Handling: Monitor retry counts and check for graceful failure handling
- Quality Tracking: Review percentage breakdowns to understand specific improvement areas
project/
βββ .feature/ # Feature workflow
β βββ {id}-{title}.md # Feature specifications
β βββ arch_{id}.md # Essential architecture
β βββ arch_{id}_research.md # Detailed research (optional)
β βββ {id}-decomposition.md # Task breakdown
βββ .task/
β βββ {id}-{title}.md # Individual tasks
βββ .plan/
β βββ arch_{id}.md # Task-specific architecture
β βββ {id}.md # Implementation plans
βββ .cache/ # Support files
β βββ arch_migration.md # Migration guide
βββ templates/ # Architecture templates
β βββ arch_essential.md # Essential arch template
β βββ arch_research.md # Research template
βββ [your code files] # Implementation results
This framework ensures systematic, high-quality feature development through coordinated agent collaboration while maintaining architectural integrity and code quality standards.