mirror of
https://github.com/jeffusion/gitea-ai-assistant.git
synced 2026-06-14 07:26:45 +00:00
feat: 添加四个分类专家Agent定义
定义correctness、security、reliability、maintainability四个领域专家的focus prompt配置 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
10
src/review/agents/correctness-agent.ts
Normal file
10
src/review/agents/correctness-agent.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import OpenAI from 'openai';
|
||||
import { SpecialistAgent } from './specialist-agent';
|
||||
import { ToolRegistry } from '../tools/registry';
|
||||
import type { LearningSystem } from '../learning/learning-system';
|
||||
|
||||
export class CorrectnessAgent extends SpecialistAgent {
|
||||
constructor(openai: OpenAI, model: string, toolRegistry?: ToolRegistry, learningSystem?: LearningSystem) {
|
||||
super(openai, model, 'correctness', 'Correctness Agent', '业务逻辑正确性、边界条件、空值处理和明显bug', toolRegistry, learningSystem);
|
||||
}
|
||||
}
|
||||
10
src/review/agents/maintainability-agent.ts
Normal file
10
src/review/agents/maintainability-agent.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import OpenAI from 'openai';
|
||||
import { SpecialistAgent } from './specialist-agent';
|
||||
import { ToolRegistry } from '../tools/registry';
|
||||
import type { LearningSystem } from '../learning/learning-system';
|
||||
|
||||
export class MaintainabilityAgent extends SpecialistAgent {
|
||||
constructor(openai: OpenAI, model: string, toolRegistry?: ToolRegistry, learningSystem?: LearningSystem) {
|
||||
super(openai, model, 'maintainability', 'Maintainability Agent', '可维护性、复杂度、接口破坏风险和可测试性不足', toolRegistry, learningSystem);
|
||||
}
|
||||
}
|
||||
10
src/review/agents/reliability-agent.ts
Normal file
10
src/review/agents/reliability-agent.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import OpenAI from 'openai';
|
||||
import { SpecialistAgent } from './specialist-agent';
|
||||
import { ToolRegistry } from '../tools/registry';
|
||||
import type { LearningSystem } from '../learning/learning-system';
|
||||
|
||||
export class ReliabilityAgent extends SpecialistAgent {
|
||||
constructor(openai: OpenAI, model: string, toolRegistry?: ToolRegistry, learningSystem?: LearningSystem) {
|
||||
super(openai, model, 'reliability', 'Reliability Agent', '错误处理、重试策略、幂等性、并发一致性和资源释放', toolRegistry, learningSystem);
|
||||
}
|
||||
}
|
||||
10
src/review/agents/security-agent.ts
Normal file
10
src/review/agents/security-agent.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import OpenAI from 'openai';
|
||||
import { SpecialistAgent } from './specialist-agent';
|
||||
import { ToolRegistry } from '../tools/registry';
|
||||
import type { LearningSystem } from '../learning/learning-system';
|
||||
|
||||
export class SecurityAgent extends SpecialistAgent {
|
||||
constructor(openai: OpenAI, model: string, toolRegistry?: ToolRegistry, learningSystem?: LearningSystem) {
|
||||
super(openai, model, 'security', 'Security Agent', '注入漏洞、权限绕过、敏感信息泄露、反序列化和输入校验缺失', toolRegistry, learningSystem);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user