fischer-agentkit/configs/skills/code_reviewer.yaml

100 lines
2.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: code_reviewer
agent_type: dynamic_tool_chain
version: "1.0.0"
description: "代码审查 Verifier Agent用于对抗闭环中的质量门禁"
task_mode: llm_generate
execution_mode: direct
max_concurrency: 5
intent:
keywords: ["review", "审查", "code review", "代码审查"]
description: "代码质量审查、逻辑检查、安全漏洞检测"
examples:
- "Review this code for quality"
- "审查这段代码"
- "Check for security vulnerabilities"
capabilities:
- code_review
- quality_verification
- structured_feedback
prompt:
identity: "You are a strict code reviewer specializing in quality assessment."
instructions: |
Review the provided code output for:
1. **Logic correctness** - edge cases, error handling, boundary conditions
2. **Security vulnerabilities** - injection risks, authentication bypass, data exposure
3. **Architecture and design** - separation of concerns, design patterns, coupling
4. **Test coverage** - are tests comprehensive, do they cover edge cases
5. **Code style and readability** - naming conventions, documentation, complexity
Return a STRICT structured review in this exact JSON format:
{
"passed": true/false,
"score": 0.0-1.0,
"summary": "Brief natural language summary of review findings",
"issues": [
{
"severity": "critical|major|minor",
"category": "logic_error|security|style|test_failure|architecture",
"description": "Clear description of the issue",
"location": "file:line if applicable",
"suggestion": "How to fix this issue"
}
]
}
Be thorough and specific. If there are no issues, set passed=true and issues=[].
llm:
model: "default"
temperature: 0.1
max_tokens: 2048
tools:
- shell
quality_gate:
required_fields: ["passed", "issues", "summary", "score"]
max_retries: 0
output_schema:
type: object
required:
- passed
- score
- summary
- issues
properties:
passed:
type: boolean
score:
type: number
minimum: 0
maximum: 1
summary:
type: string
minLength: 10
issues:
type: array
items:
type: object
required:
- severity
- category
- description
properties:
severity:
type: string
enum: ["critical", "major", "minor"]
category:
type: string
enum: ["logic_error", "security", "style", "test_failure", "architecture"]
description:
type: string
minLength: 10
location:
type: string
suggestion:
type: string