feat: add code-review scenario and cross-LLM review roles
- scenarios/code-review.md: multi-agent code review scenario with defender/attacker/security/moderator roles - config.yaml: add defender, attacker, security roles for cross-LLM review; keep existing discussion roles; add commented deepseek provider Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,9 @@ providers:
|
||||
routerai:
|
||||
base_url: "https://routerai.ru/api/v1"
|
||||
api_key: "${MEETING_ROOM_ROUTERAI_API_KEY}" # set in env or replace here
|
||||
ollama_cloud:
|
||||
api_key: 02a8f6e9f9744088885982ac645f1ce1.HB1MFh4AlTpyic9oJGxQjNuA
|
||||
base_url: https://ollama.com/v1
|
||||
|
||||
# openai:
|
||||
# base_url: "https://api.openai.com/v1"
|
||||
@@ -22,13 +25,18 @@ providers:
|
||||
# base_url: "http://localhost:11434/v1"
|
||||
# api_key: "ollama"
|
||||
|
||||
# deepseek:
|
||||
# base_url: "https://api.deepseek.com/v1"
|
||||
# api_key: "${MEETING_ROOM_DEEPSEEK_API_KEY}"
|
||||
|
||||
# ─── Roles ───
|
||||
# tools: all | full | files | readonly | web | none | or list ["read_file", "web_search"]
|
||||
|
||||
roles:
|
||||
# ── General discussion ──
|
||||
moderator:
|
||||
name: "Moderator"
|
||||
provider: routerai
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.7
|
||||
tools: "none"
|
||||
@@ -40,7 +48,7 @@ roles:
|
||||
|
||||
skeptic:
|
||||
name: "Skeptic"
|
||||
provider: routerai
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.9
|
||||
tools: "readonly"
|
||||
@@ -52,7 +60,7 @@ roles:
|
||||
|
||||
idea_generator:
|
||||
name: "Idea Generator"
|
||||
provider: routerai
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 1.0
|
||||
tools: "web"
|
||||
@@ -65,7 +73,7 @@ roles:
|
||||
|
||||
analyst:
|
||||
name: "Analyst"
|
||||
provider: routerai
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.5
|
||||
tools: "all"
|
||||
@@ -76,6 +84,45 @@ roles:
|
||||
Propose concrete action plans.
|
||||
Use tools to verify facts, read project files, and search for info.
|
||||
|
||||
# ── Code review ──
|
||||
defender:
|
||||
name: "Defender"
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.6
|
||||
tools: "readonly"
|
||||
system_prompt: |
|
||||
You wrote this code. Explain your design decisions, defend your
|
||||
choices, acknowledge legitimate concerns but push back on
|
||||
unjustified criticism. Reference specific files and line numbers
|
||||
when explaining your logic. Read the code files being reviewed.
|
||||
|
||||
attacker:
|
||||
name: "Attacker"
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.9
|
||||
tools: "readonly"
|
||||
system_prompt: |
|
||||
You are a ruthless code reviewer. Hunt for: bugs, logic errors,
|
||||
edge cases, performance bottlenecks, poor abstractions, violated
|
||||
DRY/SOLID principles, misleading names, missing tests, and dead
|
||||
code. Don't be polite — be precise. Cite specific lines.
|
||||
Use read_file and search_in_files to examine the code thoroughly.
|
||||
|
||||
security:
|
||||
name: "Security"
|
||||
provider: ollama_cloud
|
||||
model: "gpt-4o-mini"
|
||||
temperature: 0.4
|
||||
tools: "web"
|
||||
system_prompt: |
|
||||
You are a security specialist. Check for: injection vulnerabilities
|
||||
(SQL, XSS, command), auth/authz gaps, data exposure, insecure
|
||||
defaults, dependency risks, path traversal, and secret leaks.
|
||||
Use web_search to check for known CVEs in dependencies.
|
||||
Be specific — cite exact code locations and explain the attack vector.
|
||||
|
||||
defaults:
|
||||
max_rounds: 8
|
||||
language: "ru"
|
||||
|
||||
39
meeting_room/scenarios/code-review.md
Normal file
39
meeting_room/scenarios/code-review.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: "Code Review — Cross-LLM"
|
||||
participants:
|
||||
- defender
|
||||
- attacker
|
||||
- security
|
||||
- moderator
|
||||
max_rounds: 4
|
||||
---
|
||||
|
||||
# Code Review: Cross-LLM Verification
|
||||
|
||||
Automated multi-agent code review where different LLM providers cross-check each other's work.
|
||||
|
||||
## Instructions for Participants
|
||||
|
||||
**defender** — You wrote this code. Explain your design decisions, defend your choices, acknowledge legitimate concerns but push back on unjustified criticism. Reference specific files and line numbers when explaining your logic. Read the code files being reviewed.
|
||||
|
||||
**attacker** — You are a ruthless code reviewer. Hunt for: bugs, logic errors, edge cases, performance bottlenecks, poor abstractions, violated DRY/SOLID principles, misleading names, missing tests, and dead code. Don't be polite — be precise. Cite specific lines.
|
||||
|
||||
**security** — You are a security specialist. Check for: injection vulnerabilities (SQL, XSS, command), auth/authz gaps, data exposure, insecure defaults, dependency risks, path traversal, and secret leaks. Use web search to check for known CVEs in dependencies.
|
||||
|
||||
**moderator** — Keep the review focused and productive. Summarize findings after each round, categorize them (critical / important / minor / nitpick), and track action items. Ensure every concern gets a response from the defender.
|
||||
|
||||
## Review Criteria
|
||||
|
||||
1. **Correctness** — Does the code do what it's supposed to?
|
||||
2. **Security** — Are there vulnerabilities or data leaks?
|
||||
3. **Performance** — Any bottlenecks or unnecessary overhead?
|
||||
4. **Maintainability** — Is the code readable, well-structured, easy to change?
|
||||
5. **Testing** — Are edge cases covered? Are tests meaningful?
|
||||
|
||||
## Output Format
|
||||
|
||||
At the end, the moderator should produce a structured review summary:
|
||||
- **CRITICAL** — Must fix before merge
|
||||
- **IMPORTANT** — Should fix soon
|
||||
- **MINOR** — Nice to have
|
||||
- **APPROVED** — Items that passed review
|
||||
Reference in New Issue
Block a user