Chiro ERP - Issue Pipeline Orchestrator
Automates GitHub issue-to-PR workflows using specialized AI agents (analyst, architect, developer, tester, reviewer) that analyze requirements, design solutions, implement code, generate tests, and perform code reviews with HIPAA compliance checks.
README
Chiro ERP - Issue Pipeline Orchestrator
MCP Server for automated issue-to-PR pipeline with role-based AI agents.
Overview
This MCP server automates the software development workflow by processing GitHub issues through a multi-stage pipeline with specialized AI agents:
- Analyst Agent: Analyzes requirements and creates user stories
- Architect Agent: Designs technical solutions following DDD/CQRS patterns
- Developer Agent: Implements features in C#
- Tester Agent: Creates comprehensive tests
- Reviewer Agent: Reviews code for quality and compliance
Features
- 🤖 Automated issue-to-PR workflow
- 🎯 Role-based AI agents with domain expertise
- 🏗️ Architecture-aware (follows your ADRs and patterns)
- 🔒 HIPAA compliance checks
- 🧪 Automatic test generation
- 👀 Code review automation
- 🎛️ Human approval gates for complex changes
- 📊 Complexity analysis
- 🔄 Retry and approval mechanisms
Setup
1. Install Dependencies
cd mcp-servers/issue-pipeline-orchestrator
npm install
2. Configure Environment
Copy .env.example to .env and fill in your credentials:
cp .env.example .env
Required environment variables:
GITHUB_TOKEN: GitHub Personal Access Token with repo accessGITHUB_OWNER: Your GitHub username or organizationGITHUB_REPO: Repository nameOPENAI_API_KEY: OpenAI API key
3. Build
npm run build
4. Configure MCP in VS Code
Add to your VS Code settings (.vscode/settings.json):
{
"mcpServers": {
"chiro-erp-pipeline": {
"command": "node",
"args": [
"c:/Users/PC/coding/mvp/mcp-servers/issue-pipeline-orchestrator/dist/index.js"
],
"env": {
"GITHUB_TOKEN": "your_token",
"GITHUB_OWNER": "your_username",
"GITHUB_REPO": "mvp",
"OPENAI_API_KEY": "your_key"
}
}
}
}
Usage
Process an Issue Automatically
// In GitHub Copilot Chat
@workspace /tools process_issue --issueNumber 42
Check Pipeline Status
@workspace /tools get_pipeline_status --issueNumber 42
Analyze Issue Complexity
@workspace /tools analyze_issue_complexity --issueNumber 42
Approve a Stage
@workspace /tools approve_pipeline_stage --issueNumber 42 --stage "architecture" --approved true
Retry a Failed Stage
@workspace /tools retry_pipeline_stage --issueNumber 42 --stage "implementation"
GitHub Actions Integration
Create .github/workflows/auto-pipeline.yml:
name: Automated Issue Pipeline
on:
issues:
types: [labeled]
jobs:
auto-implement:
if: contains(github.event.issue.labels.*.name, 'auto-implement')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install MCP Server
run: |
cd mcp-servers/issue-pipeline-orchestrator
npm install
npm run build
- name: Process Issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_OWNER: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.event.repository.name }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
node mcp-servers/issue-pipeline-orchestrator/dist/index.js << EOF
{
"method": "tools/call",
"params": {
"name": "process_issue",
"arguments": {
"issueNumber": ${{ github.event.issue.number }}
}
}
}
EOF
Pipeline Stages
1. Analysis (Analyst Agent)
- Extracts requirements from issue
- Creates user stories
- Defines acceptance criteria
- Identifies dependencies
2. Architecture (Architect Agent)
- Designs technical solution
- Follows DDD/CQRS patterns
- Updates ADRs if needed
- Defines integration points
3. Implementation (Developer Agent)
- Generates C# code
- Follows project structure
- Implements CQRS handlers
- Creates domain events
4. Testing (Tester Agent)
- Generates unit tests
- Creates integration tests
- Ensures test coverage
- Tests edge cases
5. Code Review (Reviewer Agent)
- Reviews code quality
- Checks security issues
- Validates HIPAA compliance
- Provides feedback
Complexity Scoring
The system automatically analyzes issues and assigns complexity scores:
- Low (0-4): Simple bugs, minor enhancements - auto-implement
- Medium (5-9): Standard features - auto-implement with review
- High (10+): Complex changes - requires human oversight
Human Approval Gates
Approval is automatically required for:
- Breaking changes
- Architectural decisions
- Security-sensitive code
- HIPAA compliance implications
- High complexity scores
Customization
Adding New Agent Roles
Edit src/agents/roles.ts:
export const AGENT_ROLES: Record<string, AgentRole> = {
// ... existing roles
myCustomAgent: {
name: "My Custom Agent",
description: "Does something specific",
systemPrompt: "You are...",
tools: ["tool1", "tool2"],
maxTokens: 2000,
temperature: 0.3
}
};
Modifying Pipeline Stages
Edit src/orchestrator.ts in the initializePipeline method.
Troubleshooting
Pipeline Stuck
Check the pipeline status and use retry:
@workspace /tools retry_pipeline_stage --issueNumber 42 --stage "implementation"
Rate Limits
The system respects GitHub and OpenAI rate limits. If you hit limits:
- Reduce parallel processing
- Add delays between stages
- Use a higher-tier OpenAI plan
Agent Errors
Check agent outputs in GitHub issue comments. Common issues:
- Insufficient context
- Ambiguous requirements
- Missing dependencies
Best Practices
-
Label Issues Appropriately: Use labels like
auto-implement,bug,enhancementto help complexity analysis -
Clear Issue Descriptions: Provide detailed requirements and acceptance criteria
-
Review Generated PRs: Even with automation, human review is valuable
-
Start Small: Begin with simple issues to calibrate the system
-
Monitor Costs: Track OpenAI API usage as complex issues can use significant tokens
Security
- Never commit
.envfile - Use GitHub Secrets for CI/CD
- Rotate tokens regularly
- Review security-sensitive changes manually
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。