Skip to content

improve OpenCode adapter documentation and add specialist agents - #129

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/eval-mode
Jan 5, 2026
Merged

improve OpenCode adapter documentation and add specialist agents#129
JeremyDev87 merged 1 commit into
masterfrom
fix/eval-mode

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

improve OpenCode adapter documentation and add specialist agents

📋 Summary

This PR improves the OpenCode adapter documentation by adding specialist agents configuration and updating agent settings. It also removes the temporary PR_DESCRIPTION.md file that was accidentally committed.

🎯 Reason for Change

Documentation Improvement

  • Problem: OpenCode adapter documentation was missing specialist agents configuration examples
  • Solution: Add comprehensive specialist agents setup with proper permission configurations

Agent Mode Correction

  • Problem: eval-mode was incorrectly configured as subagent, limiting its usability
  • Solution: Change eval-mode to primary mode with appropriate permission settings

Usage Examples Update

  • Problem: Usage examples referenced old agent names (plan, build, reviewer)
  • Solution: Update examples to use correct agent names (plan-mode, act-mode, eval-mode)

🔧 Key Changes

1. Specialist Agents Configuration Added

Backend Agent

  • Agent: backend
  • Mode: subagent
  • Purpose: Backend development (Node.js, Python, Go, Java, Rust)
  • Permissions: Full edit and bash access
  • Prompt: References backend-developer.json

Architect Agent

  • Agent: architect
  • Mode: subagent
  • Purpose: Architecture and design patterns specialist
  • Permissions: Read-only (edit: deny, bash: ask)
  • Prompt: References architecture-specialist.json

Tester Agent

  • Agent: tester
  • Mode: subagent
  • Purpose: Test strategy and TDD specialist
  • Permissions: Full edit and bash access
  • Prompt: References test-strategy-specialist.json

Security Agent

  • Agent: security
  • Mode: subagent
  • Purpose: Security audit (OAuth, JWT, XSS/CSRF protection)
  • Permissions: Read-only (edit: deny, bash: ask)
  • Prompt: References security-specialist.json

Accessibility Agent

  • Agent: a11y
  • Mode: subagent
  • Purpose: WCAG 2.1 AA compliance
  • Permissions: Read-only (edit: deny, bash: ask)
  • Prompt: References accessibility-specialist.json

Performance Agent

  • Agent: performance
  • Mode: subagent
  • Purpose: Performance optimization specialist
  • Permissions: Read-only (edit: deny, bash: ask)
  • Prompt: References performance-specialist.json

2. Eval-Mode Agent Configuration Update

Before

"eval-mode": {
  "mode": "subagent",
  "tools": {
    "write": false,
    "edit": false
  }
}

After

"eval-mode": {
  "mode": "primary",
  "permission": {
    "edit": "deny",
    "bash": {
      "git status": "allow",
      "git diff*": "allow",
      "git log*": "allow",
      "*": "ask"
    }
  }
}

Changes:

  • Changed from subagent to primary mode
  • Replaced tools with permission (OpenCode standard)
  • Added specific bash command permissions for git operations
  • Maintains read-only evaluation capability

3. Agent Mapping Table Update

Added backend-developer.json to the agent mapping table:

  • Agent File: backend-developer.json
  • OpenCode Agent: backend
  • Purpose: Backend development (Node.js, Python, Go, Java, Rust)

4. Usage Examples Update

Before

opencode --agent plan
opencode --agent build
opencode --agent reviewer

After

opencode --agent plan-mode
opencode --agent act-mode
opencode --agent eval-mode

Rationale: Updated to match actual agent names defined in configuration

5. Temporary File Cleanup

  • Removed PR_DESCRIPTION.md (408 lines)
  • This file was accidentally committed and should not be in the repository

⚠️ Breaking Changes

None

✅ Testing

Configuration Validation

1. Verify JSON Structure

# Validate OpenCode configuration syntax
jq . opencode.json > /dev/null && echo "✓ Valid JSON"

2. Verify Agent Names

# Check all agent names match documentation
grep -E '"plan-mode"|"act-mode"|"eval-mode"|"backend"|"architect"|"tester"|"security"|"a11y"|"performance"' opencode.json

3. Verify Permission Settings

# Check eval-mode is primary with correct permissions
jq '.agent["eval-mode"]' opencode.json
# Should show: "mode": "primary" and "permission" object

Documentation Verification

1. Verify Agent Mapping Table

  • All specialist agents are listed in mapping table
  • Backend-developer is included
  • Agent names match configuration file

2. Verify Usage Examples

  • Examples use correct agent names (plan-mode, act-mode, eval-mode)
  • Examples are consistent throughout documentation
  • Examples match actual OpenCode CLI syntax

🔍 Review Checklist

Documentation

  • Verify all specialist agents are properly configured
  • Verify eval-mode is correctly set as primary mode
  • Verify permission settings match agent purposes
  • Verify agent mapping table includes backend-developer
  • Verify usage examples use correct agent names
  • Verify no temporary files remain in repository

Agent Configuration

  • Verify backend agent has correct permissions (edit: allow)
  • Verify specialist agents (architect, security, a11y, performance) have read-only permissions
  • Verify tester agent has full permissions
  • Verify eval-mode has appropriate git command permissions

Consistency

  • Verify agent names match between configuration and documentation
  • Verify agent descriptions match their purposes
  • Verify prompt references point to correct agent JSON files

💡 Usage Examples

Using Specialist Agents

Backend Development

/agent backend
Node.js API를 구현해줘

Architecture Review

/agent architect
현재 아키텍처를 검토해줘

Test Strategy

/agent tester
TDD 전략을 수립해줘

Security Audit

/agent security
인증 시스템의 보안을 검토해줘

Accessibility Check

/agent a11y
접근성을 검토해줘

Performance Optimization

/agent performance
성능을 최적화해줘

Using Mode Agents

PLAN Mode

/agent plan-mode
새로운 기능을 계획해줘

ACT Mode

/agent act-mode
ACT
기능을 구현해줘

EVAL Mode

/agent eval-mode
EVAL
코드를 리뷰해줘

🎯 Expected Impact

User Experience

  1. More Agent Options: Users can now access 6 additional specialist agents
  2. Correct Agent Names: Usage examples match actual configuration
  3. Better Eval Mode: eval-mode is now properly configured as primary agent
  4. Clearer Documentation: Specialist agents are clearly documented with examples

Developer Productivity

  1. Easier Backend Development: Dedicated backend agent for multi-stack development
  2. Specialized Reviews: Access to domain-specific review agents (security, a11y, performance)
  3. Architecture Guidance: Dedicated architect agent for design decisions
  4. Test Strategy: Dedicated tester agent for TDD planning

Code Quality

  1. Better Security: Security specialist agent ensures OWASP compliance
  2. Accessibility: A11y agent ensures WCAG 2.1 AA compliance
  3. Performance: Performance agent focuses on optimization
  4. Architecture: Architect agent maintains clean architecture principles

📝 Migration Guide

For Existing OpenCode Users

Update Agent Names

If you're using old agent names in your configuration:

  • planplan-mode
  • buildact-mode
  • reviewereval-mode

Add Specialist Agents

Copy the specialist agents configuration from the documentation to your opencode.json:

{
  "agent": {
    "backend": { ... },
    "architect": { ... },
    "tester": { ... },
    "security": { ... },
    "a11y": { ... },
    "performance": { ... }
  }
}

Update Eval-Mode Configuration

If you have eval-mode configured as subagent, update it to primary mode with permission settings.

🔗 Related Issues

  • Fixes documentation gaps for specialist agents
  • Corrects eval-mode configuration

📚 References

- Add specialist agents configuration to OpenCode adapter documentation and improve agent settings
- Change eval-mode to primary mode and add permission settings
- Add specialist agents (backend, architect, tester, security, a11y, performance)
- Add backend-developer to agent mapping table
- Update agent names in usage examples (plan → plan-mode, build → act-mode)

no reference
@JeremyDev87 JeremyDev87 self-assigned this Jan 5, 2026
@JeremyDev87 JeremyDev87 added the fix label Jan 5, 2026
@JeremyDev87
JeremyDev87 marked this pull request as ready for review January 5, 2026 06:27
@JeremyDev87
JeremyDev87 merged commit 7f479d1 into master Jan 5, 2026
9 checks passed
@JeremyDev87
JeremyDev87 deleted the fix/eval-mode branch January 5, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants