agentic_codegen_execute
Generate and test code automatically for GitHub issues using AI-driven development workflows. Analyzes issues, creates code, and prepares pull requests to streamline software development processes.
Instructions
CodeGenAgent実行 - AI駆動コード生成・テスト自動生成
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | タスク詳細 | |
| issue_number | Yes | GitHub Issue番号 | |
| priority | No | 優先度 | |
| title | Yes | タスクタイトル |
Implementation Reference
- server.ts:266-306 (handler)The handler function `handleCodeGenExecute` that implements the core logic of the tool by triggering the GitHub Actions workflow for the codegen agent using `gh workflow run agentic-system.yml -f agent=codegen`.private async handleCodeGenExecute(args: { issue_number: number; title: string; description: string; priority?: string; }) { try { // Trigger GitHub Actions workflow const { stdout } = await execAsync( `gh workflow run agentic-system.yml -f agent=codegen -f issue_number=${args.issue_number}`, { cwd: process.env.GITHUB_REPOSITORY_PATH || process.cwd() } ); return { content: [ { type: 'text', text: `## 🤖 CodeGenAgent起動 **Issue**: #${args.issue_number} **Title**: ${args.title} **Priority**: ${args.priority || 'P2-中'} ✅ GitHub Actionsワークフローを起動しました 進捗は Issue #${args.issue_number} で確認できます Workflow: https://github.com/${process.env.GITHUB_REPOSITORY}/actions` } ] }; } catch (error) { return { content: [ { type: 'text', text: `❌ エラー: ${error instanceof Error ? error.message : 'Unknown error'}\n\nGitHub CLIとワークフローファイルを確認してください` } ] }; } }
- server.ts:43-65 (schema)The input schema defining the parameters for the agentic_codegen_execute tool: issue_number (number, required), title (string, required), description (string, required), priority (string enum, optional).inputSchema: { type: 'object', properties: { issue_number: { type: 'number', description: 'GitHub Issue番号' }, title: { type: 'string', description: 'タスクタイトル' }, description: { type: 'string', description: 'タスク詳細' }, priority: { type: 'string', enum: ['P0-緊急', 'P1-高', 'P2-中', 'P3-低'], description: '優先度' } }, required: ['issue_number', 'title', 'description'] }
- server.ts:40-66 (registration)The tool object registration in the TOOLS array used by the listTools handler.{ name: 'agentic_codegen_execute', description: 'CodeGenAgent実行 - AI駆動コード生成・テスト自動生成', inputSchema: { type: 'object', properties: { issue_number: { type: 'number', description: 'GitHub Issue番号' }, title: { type: 'string', description: 'タスクタイトル' }, description: { type: 'string', description: 'タスク詳細' }, priority: { type: 'string', enum: ['P0-緊急', 'P1-高', 'P2-中', 'P3-低'], description: '優先度' } }, required: ['issue_number', 'title', 'description'] } },
- server.ts:226-227 (registration)The switch case dispatching calls to the agentic_codegen_execute tool to its handler function within the CallToolRequest handler.case 'agentic_codegen_execute': return await this.handleCodeGenExecute(args as any);