Quality Assurance Agent
multi-project quality assurance orchestration agent based on MCP servers
Installation
npx quality-assurance-agentAsk AI about Quality Assurance Agent
Powered by Claude Β· Grounded in docs
I know everything about Quality Assurance Agent. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π€ QA Automation Agent
Agent-based Quality Assurance Automation Framework powered by Notion MCP + Claude Agent SDK
Automatically detects, analyzes, and fixes QA issues from Notion databases - from bug detection to PR submission - completely automated!
β¨ Features
- π Automatic QA Detection - Real-time monitoring of Notion QA databases
- π§ AI-Powered Analysis - Claude analyzes text + images (OCR + Vision API)
- π€ Smart Classification - Determines actionability and work complexity
- π» Automated Code Fixes - Generates bug fixes and features automatically
- β Test Generation - Creates comprehensive test suites
- π PR Management - Creates GitHub Pull Requests with detailed descriptions
- π¬ Slack Integration - Real-time notifications for team visibility
- π Multi-Project Support - Handles multiple repositories (roadmap)
ποΈ Architecture
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
π Quick Start
Prerequisites
- Node.js 20+
- Notion workspace with Integration
- GitHub repository access
- Anthropic API key
- Slack workspace (optional)
Installation
# Clone the repository
git clone <your-repo>
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
βοΈ Configuration
Environment Variables
Create .env file with the following:
# 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
See .env.example for complete configuration options.
π Usage
1. Setup Notion Database
Create a Notion database with the following properties:
- Title (title): QA issue title
- Status (select): Not Started, In Progress, Done, Not Actionable
- Description (rich text): Issue description
- Reporter (person): Who reported the issue
- Priority (select, optional): critical, high, medium, low
- PR URL (url, optional): Auto-filled by the agent
2. Create Notion Integration
- Go to https://www.notion.so/my-integrations
- Create new integration
- Copy the Integration Token β
NOTION_TOKEN - Share your database with the integration
3. Setup GitHub Token
- Go to GitHub Settings β Developer Settings β Personal Access Tokens
- Generate new token (fine-grained)
- Grant permissions:
- Contents: Read & Write
- Pull Requests: Read & Write
- Copy token β
GITHUB_TOKEN
4. Get Anthropic API Key
- Go to https://console.anthropic.com
- Create API key
- Copy β
ANTHROPIC_API_KEY
5. Run the Agent
# Development mode (hot reload)
npm run dev
# Production mode
npm start
6. Create a QA Item in Notion
- Add new item to your Notion database
- Set Status to "Not Started"
- Watch the magic happen! π©β¨
π¬ Example Workflow
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"
π οΈ Development
Project Structure
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
Available Scripts
# 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
Adding a New Agent
- Create new agent class extending
BaseAgent:
import { BaseAgent } from './base.js';
import type { AgentConfig, AgentContext } from '../types/index.js';
export class MyCustomAgent extends BaseAgent<InputType, OutputType> {
constructor(config: AgentConfig, context: AgentContext) {
super(
{
...config,
agentType: 'my-custom-agent',
timeout: 120000,
},
context
);
}
protected async run(input?: InputType): Promise<OutputType> {
// Your implementation
}
}
- Add to orchestrator workflow
- Update type definitions
- Write tests
π Documentation
- Agent Architecture - Detailed architecture explanation
- Implementation Roadmap - Development phases
- Setup Guide - Complete setup instructions
- Multi-Project Guide - Multi-project configuration
π§ͺ Testing
# 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
π Troubleshooting
Common Issues
Issue: MCP Connection Failed
Error: Not connected to Notion MCP
Solution: Check NOTION_TOKEN and ensure integration has access to the database
Issue: GitHub Authentication Failed
Error: Bad credentials
Solution: Verify GITHUB_TOKEN is valid and has correct permissions
Issue: Anthropic API Error
Error: Invalid API key
Solution: Check ANTHROPIC_API_KEY format (should start with sk-ant-)
Issue: Agent Timeout
Error: Agent timeout after 300000ms
Solution: Increase timeout in agent configuration or check API connectivity
π Security
- β
All API keys stored in
.env(not committed) - β Fine-grained GitHub tokens (minimal permissions)
- β Notion Integration scoped to specific databases
- β Code Agent restricted file access
- β Comprehensive audit logging
Never commit .env or expose API keys!
π Monitoring
Logs are written to:
logs/qa-automation.log- All logslogs/error.log- Errors onlylogs/exceptions.log- Uncaught exceptions
Monitor agent activity:
# 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\]"
π¦ Roadmap
Phase 1: Single Project (β Current)
- Complete agent architecture
- Notion MCP integration
- GitHub PR automation
- Slack notifications
- Full documentation
Phase 2: Multi-Project
- Project configuration system
- Resource management
- Cross-project analytics
- Admin dashboard
Phase 3: Intelligence & Learning
- Track PR approval rates
- Learn from feedback
- Pattern recognition
- Custom agent plugins
π€ Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
π License
MIT License - see LICENSE file for details
π Acknowledgments
- Anthropic - Claude API
- Notion - MCP Server
- @modelcontextprotocol/sdk - MCP SDK
- @octokit/rest - GitHub API
- Tesseract.js - OCR
π Support
- GitHub Issues: https://github.com/ssh00n/quality-assurance-agent/issues
- Documentation: See
/docsdirectory - Examples: See
/samplesdirectory
Built with β€οΈ using TypeScript, Claude, and Notion MCP
π€ Happy Automating!
