refactor: adjust agent model assignments based on role analysis

- frontend-architect: opus → sonnet (executes planner's plan)
- backend-architect: opus → sonnet (executes planner's plan)
- code-reviewer: sonnet → opus (deep reasoning for vulnerability/architecture analysis)
- prompt-engineer: marked as optional (only for projects with LLM integration)

Principle: planner does deep thinking, implementation agents execute the plan.
Opus reserved for: planning, security audit, code review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
olekhondera
2026-03-24 20:22:33 +02:00
parent db5ba04fb9
commit 0351a0fb03
5 changed files with 16 additions and 13 deletions

View File

@@ -7,27 +7,29 @@ This directory contains specialized AI agent profiles. Each profile defines a ro
| Agent | File | Model | Use When | | Agent | File | Model | Use When |
| -------------------- | ------------------------- | ------ | -------------------------------------------------------- | | -------------------- | ------------------------- | ------ | -------------------------------------------------------- |
| Planner | `planner.md` | opus | Breaking down tasks, planning implementations, risk assessment | | Planner | `planner.md` | opus | Breaking down tasks, planning implementations, risk assessment |
| Frontend Architect | `frontend-architect.md` | opus | UI components, performance, accessibility, React/Next.js |
| Backend Architect | `backend-architect.md` | opus | System design, databases, APIs, scalability |
| Security Auditor | `security-auditor.md` | opus | Security review, vulnerability assessment, auth flows | | Security Auditor | `security-auditor.md` | opus | Security review, vulnerability assessment, auth flows |
| Code Reviewer | `code-reviewer.md` | sonnet | Code quality, PR review, best practices | | Code Reviewer | `code-reviewer.md` | opus | Code quality, PR review, deep analysis |
| Frontend Architect | `frontend-architect.md` | sonnet | UI components, performance, accessibility, React/Next.js |
| Backend Architect | `backend-architect.md` | sonnet | System design, databases, APIs, scalability |
| Test Engineer | `test-engineer.md` | sonnet | Test strategy, automation, CI/CD, coverage | | Test Engineer | `test-engineer.md` | sonnet | Test strategy, automation, CI/CD, coverage |
| Prompt Engineer | `prompt-engineer.md` | sonnet | LLM prompts, agent instructions, prompt optimization |
| Documentation Expert | `documentation-expert.md` | sonnet | Technical writing, user/admin guides, docs maintenance | | Documentation Expert | `documentation-expert.md` | sonnet | Technical writing, user/admin guides, docs maintenance |
| Build Error Resolver | `build-error-resolver.md` | sonnet | Fix build/type/lint errors with minimal changes | | Build Error Resolver | `build-error-resolver.md` | sonnet | Fix build/type/lint errors with minimal changes |
| Loop Operator | `loop-operator.md` | sonnet | Monitor autonomous loops, detect stalls, escalate | | Loop Operator | `loop-operator.md` | sonnet | Monitor autonomous loops, detect stalls, escalate |
| Prompt Engineer * | `prompt-engineer.md` | sonnet | LLM prompts, agent instructions (optional, for AI projects) |
## Model Selection ## Model Selection
- **opus** — Deep reasoning tasks: planning, architecture, security review. Slower but more thorough. - **opus** — Deep reasoning: planning, security audit, code review. Slower but more thorough.
- **sonnet** — Implementation tasks: code review, testing, writing, fixing. Faster turnaround. - **sonnet** — Implementation: architecture execution, testing, writing, fixing. Faster turnaround.
Principle: planner does the deep thinking, implementation agents execute the plan.
## Tool Restrictions ## Tool Restrictions
Each agent declares a `tools` array in its frontmatter, following the principle of least privilege: Each agent declares a `tools` array in its frontmatter, following the principle of least privilege:
- **Read-only agents** (planner, architects): Read, Glob, Grep — they advise, not implement - **Read-only agents** (planner): Read, Glob, Grep — plans, doesn't implement
- **Implementation agents** (test-engineer, build-error-resolver): Read, Glob, Grep, Edit, Write, Bash - **Implementation agents** (architects, test-engineer, build-error-resolver): Read, Glob, Grep, Edit, Write, Bash
- **Review agents** (code-reviewer): Read, Glob, Grep, Bash (for git commands) - **Review agents** (code-reviewer, security-auditor): Read, Glob, Grep, Bash (for git/scan commands)
## Agent Selection ## Agent Selection

View File

@@ -1,6 +1,6 @@
--- ---
name: backend-architect name: backend-architect
model: opus model: sonnet
tools: tools:
- Read - Read
- Glob - Glob

View File

@@ -1,6 +1,6 @@
--- ---
name: code-reviewer name: code-reviewer
model: sonnet model: opus
tools: tools:
- Read - Read
- Glob - Glob

View File

@@ -1,6 +1,6 @@
--- ---
name: frontend-architect name: frontend-architect
model: opus model: sonnet
tools: tools:
- Read - Read
- Glob - Glob

View File

@@ -7,8 +7,9 @@ tools:
- Grep - Grep
- Write - Write
- Edit - Edit
optional: true
description: | description: |
Prompt engineering specialist for LLMs. Use when: Optional agent for projects with LLM integration. Use when:
- Creating system prompts for AI agents - Creating system prompts for AI agents
- Improving existing prompts for better consistency - Improving existing prompts for better consistency
- Debugging prompts that produce inconsistent outputs - Debugging prompts that produce inconsistent outputs