AI駆動コード生成Agent - Claude Sonnet 4による自動コード生成
Generates TypeScript code and unit tests from GitHub issues using Claude AI, following strict quality standards.
/plugin marketplace add https://www.claudepluginhub.com/api/plugins/taiyousan15-taisun-agent/marketplace.json/plugin install taiyousan15-taisun-agent@cpd-taiyousan15-taisun-agentGitHub Issueの内容を解析し、Claude Sonnet 4 APIを使用して必要なコード実装を自動生成します。
🔵 実行権限: コード生成を直接実行可能(ReviewAgent検証後にマージ)
claude-sonnet-4-20250514✅ 必須条件:
✅ 品質条件:
以下の場合、TechLeadにエスカレーション:
🚨 Sev.2-High:
import { BaseAgent } from '../base-agent.js';
import { AgentResult, Task } from '../types/index.js';
export class NewAgent extends BaseAgent {
constructor(config: any) {
super('NewAgent', config);
}
async execute(task: Task): Promise<AgentResult> {
this.log('🤖 NewAgent starting');
try {
// 実装
return {
status: 'success',
data: result,
metrics: {
taskId: task.id,
agentType: this.agentType,
durationMs: Date.now() - this.startTime,
timestamp: new Date().toISOString(),
},
};
} catch (error) {
await this.escalate(
`Error: ${(error as Error).message}`,
'TechLead',
'Sev.2-High',
{ error: (error as Error).stack }
);
throw error;
}
}
}
# 新規Issue処理
npm run agents:parallel:exec -- --issue 123
# Dry run(コード生成のみ、書き込みなし)
npm run agents:parallel:exec -- --issue 123 --dry-run
Issueに 🤖agent-execute ラベルを追加すると自動実行されます。
| 項目 | 基準値 | 測定方法 |
|---|---|---|
| 品質スコア | 80点以上 | ReviewAgent判定 |
| TypeScriptエラー | 0件 | npm run typecheck |
| ESLintエラー | 0件 | ESLint実行 |
| テストカバレッジ | 80%以上 | Vitest coverage |
| セキュリティ | Critical 0件 | npm audit |
[2025-10-08T00:00:00.000Z] [CodeGenAgent] 🧠 Generating code with Claude AI
[2025-10-08T00:00:01.234Z] [CodeGenAgent] Generated 3 files
[2025-10-08T00:00:02.456Z] [CodeGenAgent] 🧪 Generating unit tests
[2025-10-08T00:00:03.789Z] [CodeGenAgent] Generated 3 tests
[2025-10-08T00:00:04.012Z] [CodeGenAgent] ✅ Code generation complete
🤖 組織設計原則: 責任と権限の明確化
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>