Your expert development partner for complex coding tasks
OpenCoder is a specialized development agent focused on complex coding tasks, architecture analysis, and multi-file refactoring. It follows strict plan-and-approve workflows with modular and functional programming principles.
Key Characteristics:
✅ Multi-file refactoring (4+ files)
✅ Architecture analysis and improvements
✅ Complex code implementations
✅ Pattern discovery and application
✅ Deep codebase analysis
Use openagent for:
Rule of thumb:
OpenCoder always proposes a plan first:
1. Analyzes the request
2. Creates step-by-step implementation plan
3. Presents plan to user
4. Waits for approval
No implementation happens without approval.
For features spanning multiple modules or estimated > 60 minutes, OpenCoder delegates to @task-manager to create atomic subtasks.
Implements incrementally - one step at a time:
For each step:
1. Implement the code
2. Run type checks (if applicable)
3. Run linting (if configured)
4. Run build checks
5. Execute relevant tests
6. Validate results
7. Move to next step
Validation happens continuously, not just at the end.
For simple subtasks, delegates to @subagents/coder-agent to save time.
When implementation is complete:
1. Final validation
2. User approval
3. Handoff recommendations for:
- @tester (if tests needed)
- @documentation (if docs needed)
- @reviewer (if security review needed)
OpenCoder adapts to the project's language automatically:
node, bun, or denotsceslintjest, vitest, mochapythonmypypylint, flake8pytest, unittestgo buildgolangci-lintgo testcargo check, cargo buildclippycargo testOpenCoder follows these principles:
OpenCoder coordinates with specialized subagents:
When: Features spanning 4+ files or > 60 minutes
Purpose: Break down into atomic subtasks
Output: Task files under tasks/subtasks/{feature}/
When: Simple, focused implementation tasks Purpose: Quick code implementation Output: Implemented code following specifications
When: Tests needed for implementation Purpose: Write comprehensive test suites Output: Unit, integration, and e2e tests
When: Security or quality review needed Purpose: Code review, security analysis Output: Review report with recommendations
When: Build validation needed Purpose: Type checking, build verification Output: Build status, error reports
When: Comprehensive documentation needed Purpose: Generate API docs, guides Output: Structured documentation
opencode --agent opencoder
> "Refactor the authentication module to use dependency injection across all 8 files"
# OpenCoder will:
# 1. Analyze current structure (8 files)
# 2. Propose refactoring plan
# 3. Wait for approval
# 4. Delegate to @task-manager (8 files > 4 file threshold)
# 5. Implement subtasks one at a time
# 6. Validate incrementally
# 7. Complete when all subtasks done
opencode --agent opencoder
> "Analyze the architecture of this codebase and suggest improvements"
# OpenCoder will:
# 1. Scan codebase structure
# 2. Identify patterns and anti-patterns
# 3. Propose architectural improvements
# 4. Wait for approval
# 5. Implement approved changes
# 6. Validate with build and tests
opencode --agent opencoder
> "Implement the repository pattern for all database access across the data layer"
# OpenCoder will:
# 1. Identify all database access points
# 2. Design repository interface
# 3. Propose implementation plan
# 4. Wait for approval
# 5. Delegate to @task-manager (multi-file)
# 6. Implement repositories incrementally
# 7. Update all consumers
# 8. Add tests via @tester
# 9. Validate complete implementation
opencode --agent opencoder
> "Implement user authentication with JWT, refresh tokens, and role-based access control"
# OpenCoder will:
# 1. Analyze requirements (complex, multi-file)
# 2. Design authentication architecture
# 3. Propose implementation plan (multiple phases)
# 4. Wait for approval
# 5. Delegate to @task-manager (create subtasks)
# 6. Implement Phase 1: JWT infrastructure
# 7. Implement Phase 2: Refresh token mechanism
# 8. Implement Phase 3: RBAC system
# 9. Coordinate with @tester for test coverage
# 10. Coordinate with @reviewer for security review
# 11. Validate end-to-end
Good: "Refactor the API layer to use dependency injection in controllers and services" Bad: "Make the code better"
If refactoring existing code, mention:
OpenCoder will show you the plan before implementation. Take time to:
Don't manually delegate to subagents. OpenCoder knows when to:
If a tests/ directory exists, OpenCoder will:
OpenCoder implements one step at a time, not all at once. This:
OpenCoder adapts to your language:
OpenCoder is configured in .opencode/agent/opencoder.md. Default settings:
temperature: 0.1 # Deterministic, precise
tools: read, edit, write, grep, glob, bash, patch
permissions:
bash: Limited (ask for risky commands)
edit: Deny secrets, node_modules, .git
| Aspect | OpenAgent | OpenCoder |
|---|---|---|
| Primary Use | General coordinator | Development specialist |
| Best For | Questions, docs, coordination | Complex coding, architecture |
| Coding Tasks | Simple (1-3 files) | Complex (4+ files) |
| Delegation | Delegates coding to opencoder | Delegates testing, review |
| Expertise | Broad, adaptive | Deep, technical |
| User Profile | Everyone (default) | Developers |
| Plan Detail | High-level | Implementation-level |
| Validation | Basic | Comprehensive (type, lint, build, test) |
OpenCoder is your specialized development partner for:
Use OpenAgent for general tasks and coordination. Use OpenCoder when you need deep development expertise.
Start here:
opencode --agent opencoder
> "Your complex coding task..."
Learn more: