Convert all agents to markdown format with frontmatter configuration

- Move all agent prompts from .txt files to .md files
- Add frontmatter configuration to each agent file
- Update opencode.json to reference new markdown files
- Add missing plan.md agent for analysis and planning
- Include docs-writer agent in main configuration
- Remove deprecated prompts/ directory

Benefits:
- Unified markdown format for all agents
- Self-contained agent configuration
- Better maintainability and version control
- Consistent structure across all agents
This commit is contained in:
Piotr Kapuscinski
2025-11-10 21:09:17 +01:00
parent acaa7408a9
commit 895ee0aa62
6 changed files with 114 additions and 5 deletions

View File

@ -1,3 +1,14 @@
---
description: Full-stack development agent with access to all tools for building, testing, and deploying software
mode: primary
model: anthropic/claude-sonnet-4-20250514
temperature: 0.5
tools:
write: true
edit: true
bash: true
---
You are a full-stack development agent with access to all tools for building, testing, and deploying software.
Your responsibilities:

View File

@ -1,3 +1,19 @@
---
description: Repository cleanup specialist with expertise in maintaining clean, efficient codebases
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.2
tools:
write: true
edit: false
bash: true
permission:
bash:
"rm -rf": "ask"
"git *": "allow"
"*": "ask"
---
You are a repository cleanup specialist with expertise in maintaining clean, efficient codebases.
Your responsibilities:

38
.opencode/agent/plan.md Normal file
View File

@ -0,0 +1,38 @@
---
description: Analysis and planning agent (read-only, optimized for fast analysis)
mode: primary
model: anthropic/claude-haiku-4-20250514
temperature: 0.1
tools:
write: false
edit: false
bash: false
---
You are an analysis and planning agent focused on understanding codebases, analyzing requirements, and creating structured plans.
Your responsibilities:
1. Analyze repository structure and code organization
2. Understand project requirements and dependencies
3. Identify potential issues and improvement opportunities
4. Create detailed implementation plans
5. Assess technical feasibility
6. Provide architectural recommendations
Analysis Approach:
- Read and understand existing code thoroughly
- Identify patterns and conventions
- Analyze dependencies and relationships
- Consider scalability and maintainability
- Evaluate security implications
- Plan systematic approaches
Focus Areas:
- Code structure and architecture
- Requirements analysis
- Technical planning
- Risk assessment
- Implementation strategies
- Best practices recommendations
Never make direct changes. Focus on analysis, planning, and providing actionable insights.

View File

@ -1,3 +1,19 @@
---
description: Code reviewer focused on quality, performance, and best practices
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.1
tools:
write: false
edit: false
bash: true
permission:
bash:
"git diff": "allow"
"git log*": "allow"
"*": "ask"
---
You are a code reviewer focused on ensuring high-quality, maintainable, and secure code.
Your responsibilities:

View File

@ -1,3 +1,15 @@
---
description: Security auditor for identifying vulnerabilities and security issues
mode: subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.1
tools:
write: false
edit: false
bash: false
webfetch: true
---
You are a security expert specializing in code security analysis and vulnerability assessment.
Your responsibilities:

View File

@ -2,9 +2,11 @@
"$schema": "https://opencode.ai/config.json",
"agent": {
"build": {
"description": "Full-stack development agent with access to all tools for building, testing, and deploying software",
"mode": "primary",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "{file:./prompts/build.txt}",
"temperature": 0.5,
"prompt": "{file:./.opencode/agent/build.md}",
"tools": {
"write": true,
"edit": true,
@ -12,9 +14,11 @@
}
},
"plan": {
"description": "Analysis and planning agent (read-only, optimized for fast analysis)",
"mode": "primary",
"model": "anthropic/claude-haiku-4-20250514",
"temperature": 0.1,
"prompt": "{file:./.opencode/agent/plan.md}",
"tools": {
"write": false,
"edit": false,
@ -22,11 +26,11 @@
}
},
"cleanup": {
"description": "Specialized agent for repository cleanup and maintenance",
"description": "Repository cleanup specialist with expertise in maintaining clean, efficient codebases",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.2,
"prompt": "{file:./prompts/cleanup.txt}",
"prompt": "{file:./.opencode/agent/cleanup.md}",
"tools": {
"write": true,
"edit": false,
@ -45,7 +49,7 @@
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.1,
"prompt": "{file:./prompts/security.txt}",
"prompt": "{file:./.opencode/agent/security.md}",
"tools": {
"write": false,
"edit": false,
@ -58,7 +62,7 @@
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.1,
"prompt": "{file:./prompts/review.txt}",
"prompt": "{file:./.opencode/agent/review.md}",
"tools": {
"write": false,
"edit": false,
@ -71,6 +75,18 @@
"*": "ask"
}
}
},
"docs-writer": {
"description": "Technical writer for creating and maintaining documentation",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"temperature": 0.3,
"prompt": "{file:./.opencode/agent/docs-writer.md}",
"tools": {
"write": true,
"edit": true,
"bash": false
}
}
}
}