Token导航 LogoToken导航TokenDH.com
Quality Assurance Agent logo
开发工具未说明官方级别未说明来源级核验

Quality Assurance Agent

MCP Server

一个基于Notion MCP和Claude Agent SDK的自动化质量保证框架,能够自动检测、分析并修复Notion数据库中的QA问题,从错误检测到PR提交全程自动化。

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
TypeScriptClaude自动化测试Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ssh00n

提供方

ssh00n

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

🤖 QA自动化代理

基于代理的质量保证自动化框架 由Notion MCP+Claude Agent SDK提供支持

从Notion数据库自动检测、分析和修复QA问题——从错误检测到PR提交——完全自动化!

______________________________________________________________________

✨ 特性

  • 🔍 自动QA检测 -Notion QA数据库的实时监控
  • 🧠 AI驱动的分析 -Claude分析文本+图像(OCR+Vision API)
  • 🤔 智能分类 -确定可操作性和工作复杂性
  • 💻 自动代码修复 -自动生成错误修复和功能
  • 测试生成 -创建全面的测试套件
  • 🔀 公共关系管理 -创建带有详细描述的GitHub Pull请求
  • 💬 Slack集成 -实时通知团队可见性
  • 📊 多项目支持 -处理多个存储库(路线图)

______________________________________________________________________

🏗️ 建筑

Notion QA (Not Started)
    ↓
QA Analyzer Agent
    ├─ Text Analysis (Claude)
    ├─ Image OCR (Tesseract.js)
    └─ Vision Analysis (Claude Vision)
    ↓
Action Classifier Agent
    ├─ Actionability Check
    ├─ Work Type Classification
    └─ Complexity Estimation
    ↓
Code Agent
    ├─ Codebase Analysis
    ├─ Bug Fix Implementation
    └─ Test Generation
    ↓
PR Manager Agent
    ├─ Branch Creation
    ├─ Code Commit
    └─ Pull Request
    ↓
✅ Done + Slack Notification

______________________________________________________________________

🚀 快速开始

先决条件

  • Node.js 20+
  • 集成概念工作空间
  • GitHub存储库访问
  • 无烟煤API键
  • Slack工作空间(可选)

安装

# Clone the repository
git clone 
cd quality-assurance-agent

# Install dependencies
npm install

# Setup environment variables
cp .env.example .env
# Edit .env with your credentials

# Build the project
npm run build

# Run the agent
npm start

______________________________________________________________________

⚙️ 配置

环境变量

创建 .env 文件包含以下内容:

# Anthropic API
ANTHROPIC_API_KEY=sk-ant-api03-xxxxx

# Notion
NOTION_TOKEN=secret_xxxxx
NOTION_DATABASE_ID=your-database-id

# GitHub
GITHUB_TOKEN=ghp_xxxxx
GITHUB_OWNER=your-org
GITHUB_REPO=your-repo
GITHUB_DEFAULT_BRANCH=main

# Slack (Optional)
SLACK_BOT_TOKEN=xoxb-xxxxx
SLACK_CHANNEL_QA=#qa-automation

# Agent Configuration
MAX_CONCURRENT_AGENTS=3
SESSION_TIMEOUT=3600
LOG_LEVEL=info

.env.example 了解完整的配置选项。

______________________________________________________________________

📖 用法

1.设置概念数据库

创建具有以下属性的Notion数据库:

  • 标题 (title):QA问题标题
  • 状态 (选择):未开始、正在进行、已完成、不可操作
  • 描述 (富格文本):问题描述
  • 记者 (人):谁报告了这个问题
  • 优先级 (选择,可选):严重、高、中、低
  • PR网址 (url,可选):由代理自动填充

2.创建概念集成

  1. 首选https://www.notion.so/my-integrations
  2. 创建新的集成
  3. 复制集成令牌→ NOTION_TOKEN
  4. 通过集成共享您的数据库

3.设置GitHub Token

  1. 转到GitHub设置→ 开发人员设置→ 个人访问令牌
  2. 生成新令牌(细粒度)
  3. 授予权限:

- 内容:读写 - 拉取请求:读写

  1. 复制令牌→ GITHUB_TOKEN

4.获取Anthropic API密钥

  1. 首选https://console.anthropic.com
  2. 创建API密钥
  3. Copy → ANTHROPIC_API_KEY

5.运行代理

# Development mode (hot reload)
npm run dev

# Production mode
npm start

6.在概念中创建QA项

  1. 将新项目添加到您的Notion数据库
  2. 将状态设置为“未启动”
  3. 看魔术发生! 🎩✨

______________________________________________________________________

🎬 工作流示例

1. QA Reported in Notion
   Title: "Login button not working on mobile"
   Description: "When I tap login on iOS, nothing happens"
   Status: Not Started

2. Agent Detects QA
   📥 New QA detected: "Login button not working..."

3. Analysis Phase
   🔍 Analyzing text and images...
   Issue Type: bug
   Severity: high
   Affected Components: [auth, mobile-ui]

4. Classification Phase
   🤔 Determining actionability...
   Decision: Actionable
   Work Type: bug_fix
   Complexity: moderate

5. Implementation Phase
   💻 Generating code fix...
   Files Changed:
     - src/components/LoginButton.tsx
     - tests/LoginButton.test.tsx

6. PR Creation
   🔀 Creating pull request...
   PR #123 created: "fix: Login button not working on mobile"

7. Completion
   ✅ QA completed!
   Notion updated: Status → Done, PR URL added
   Slack notification sent: "QA #123 completed! Review PR"

______________________________________________________________________

🛠️ 发展

项目结构

quality-assurance-agent/
├── src/
│   ├── agents/              # Agent implementations
│   │   ├── base.ts          # Base agent class
│   │   ├── qa-analyzer.ts   # QA analysis
│   │   ├── action-classifier.ts
│   │   ├── code-agent.ts    # Code implementation
│   │   └── pr-manager.ts    # PR management
│   │
│   ├── orchestrator/        # Main orchestration
│   │   ├── main.ts          # Main orchestrator
│   │   └── session-manager.ts
│   │
│   ├── services/            # External integrations
│   │   ├── notion-mcp.ts    # Notion MCP client
│   │   ├── github-client.ts # GitHub API
│   │   ├── slack-notifier.ts
│   │   └── ocr-service.ts
│   │
│   ├── types/               # TypeScript types
│   ├── utils/               # Utilities
│   └── index.ts             # Entry point
│
├── config/                  # Configuration files
├── tests/                   # Test suites
├── docs/                    # Documentation
└── logs/                    # Application logs

可用脚本

# Development
npm run dev          # Run with hot reload
npm run build        # Build TypeScript
npm start            # Run production build

# Code Quality
npm run lint         # Run ESLint
npm run format       # Format with Prettier
npm test             # Run tests
npm run test:watch   # Run tests in watch mode
npm run test:coverage # Coverage report

# Type Checking
npm run typecheck    # TypeScript type check

添加新代理

  1. 创建新的代理类扩展 BaseAgent:
import { BaseAgent } from './base.js';
import type { AgentConfig, AgentContext } from '../types/index.js';

export class MyCustomAgent extends BaseAgent {
  constructor(config: AgentConfig, context: AgentContext) {
    super(
      {
        ...config,
        agentType: 'my-custom-agent',
        timeout: 120000,
      },
      context
    );
  }

  protected async run(input?: InputType): Promise {
    // Your implementation
  }
}
  1. 添加到编排器工作流
  2. 更新类型定义
  3. 编写测试

______________________________________________________________________

📚 文档

______________________________________________________________________

🧪 测试

# Run all tests
npm test

# Unit tests only
npm run test:unit

# Integration tests
npm run test:integration

# End-to-end tests
npm run test:e2e

# Coverage report
npm run test:coverage

______________________________________________________________________

🐛 故障排除

常见问题

问题:MCP连接失败

Error: Not connected to Notion MCP

解决方案:检查NOTION_TOKEN并确保集成可以访问数据库

问题:GitHub身份验证失败

Error: Bad credentials

解决方案:验证GITHUB_TOKEN是否有效并且具有正确的权限

问题:人类API错误

Error: Invalid API key

解决方案:检查ANTHROPIC_API_KEY格式(应以开头 sk-ant-)

问题:代理超时

Error: Agent timeout after 300000ms

解决方案:增加代理配置超时或检查API连接

______________________________________________________________________

🔐 安全

  • ✅ 存储在中的所有API密钥 .env (未承诺)
  • ✅ 细粒度GitHub令牌(最低权限)
  • ✅ Notion集成仅限于特定数据库
  • ✅ 代码代理限制文件访问
  • ✅ 全面的审计日志记录

永不承诺 .env 或公开API密钥!

______________________________________________________________________

📊 监控

日志将写入:

  • logs/qa-automation.log -所有日志
  • logs/error.log -仅错误
  • logs/exceptions.log -无异常

监控代理活动:

# Tail logs
tail -f logs/qa-automation.log

# Filter by session
tail -f logs/qa-automation.log | grep "Session:session-123"

# Filter by agent type
tail -f logs/qa-automation.log | grep "\[qa-analyzer\]"

______________________________________________________________________

🚦 路线图

第一阶段:单一项目(✅ 当前)

  • \[x\] 完整的代理架构
  • \[x\] MCP集成概念
  • \[x\] GitHub公关自动化
  • \[x\] 松弛通知
  • \[x\] 完整文档

第二阶段:多项目

  • \[\]项目配置系统
  • \[\]资源管理
  • \[\]跨项目分析
  • \[\]管理仪表板

第三阶段:智力与学习

  • \[\]跟踪PR批准率
  • \[\]从反馈中学习
  • \[\]模式识别
  • \[\]自定义代理插件

______________________________________________________________________

🤝 贡献

欢迎投稿!请阅读 贡献.md 作为指导方针。

  1. 分叉存储库
  2. 创建特征分支(git checkout -b feature/amazing-feature)
  3. 提交更改(git commit -m 'Add amazing feature')
  4. 推送到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

______________________________________________________________________

📜 许可证

MIT许可证-请参阅 许可证 详细信息文件

______________________________________________________________________

🙏 致谢

______________________________________________________________________

📞 支持

  • GitHub 问题: https://github.com/ssh00n/quality-assurance-agent/issues
  • 文档:参见 /docs 目录
  • 例子:参见 /samples 目录

______________________________________________________________________

内置❤️ 使用TypeScript、Claude和Notion MCP

🤖 自动化快乐!

目录标签

目录标签

TypeScriptClaude自动化测试质量保证本地部署AI分析代码修复PR管理

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

api-key

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明api-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP