router-qa
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRouter: Quality Assurance
路由器:质量保证
Master orchestrator for quality engineering that routes testing, observability, resilience, debugging, and documentation quality questions through 12 specialized QA skills, with explicit handoffs when the request is outside QA scope (implementation, docs authoring, deployment).
质量工程的主编排器,可将测试、可观测性、韧性、调试和文档质量相关问题路由至12个专业QA技能;当请求超出QA范围(如实现、文档编写、部署)时,会进行明确的移交。
Quick Decision Tree
快速决策树
text
QA QUESTION
│
├─► "What tests do I need?" ──────────► qa-testing-strategy
│ └─► Test pyramid, coverage, risk-based
│
├─► "Write E2E tests" ────────────────► qa-testing-playwright
│ └─► Selectors, page objects, CI/CD
│
├─► "Test iOS app" ───────────────────► qa-testing-ios
│ └─► XCTest, simulators, device matrix
│
├─► "Test mobile app" ────────────────► qa-testing-mobile
│ └─► Cross-platform, Android + iOS
│
├─► "Test Android app" ──────────────► qa-testing-android
│ └─► Espresso, UIAutomator, Compose
│
├─► "Test API contracts" ─────────────► qa-api-testing-contracts
│ └─► OpenAPI, Pact, schema validation
│
├─► "Test LLM agent" ─────────────────► qa-agent-testing
│ └─► Scenarios, scoring, refusals
│
├─► "Debug this issue" ───────────────► qa-debugging
│ └─► Stack traces, logging, profiling
│
├─► "Setup monitoring" ───────────────► qa-observability
│ └─► OpenTelemetry, SLOs, tracing
│
├─► "Handle failures" ────────────────► qa-resilience
│ └─► Circuit breakers, retries, chaos
│
├─► "Refactor safely" ────────────────► qa-refactoring
│ └─► Characterization tests, seams
│
└─► "Check docs coverage" ────────────► qa-docs-coverage
└─► Gap analysis, runbook validation
text
QA QUESTION
│
├─► "What tests do I need?" ──────────► qa-testing-strategy
│ └─► Test pyramid, coverage, risk-based
│
├─► "Write E2E tests" ────────────────► qa-testing-playwright
│ └─► Selectors, page objects, CI/CD
│
├─► "Test iOS app" ───────────────────► qa-testing-ios
│ └─► XCTest, simulators, device matrix
│
├─► "Test mobile app" ────────────────► qa-testing-mobile
│ └─► Cross-platform, Android + iOS
│
├─► "Test Android app" ──────────────► qa-testing-android
│ └─► Espresso, UIAutomator, Compose
│
├─► "Test API contracts" ─────────────► qa-api-testing-contracts
│ └─► OpenAPI, Pact, schema validation
│
├─► "Test LLM agent" ─────────────────► qa-agent-testing
│ └─► Scenarios, scoring, refusals
│
├─► "Debug this issue" ───────────────► qa-debugging
│ └─► Stack traces, logging, profiling
│
├─► "Setup monitoring" ───────────────► qa-observability
│ └─► OpenTelemetry, SLOs, tracing
│
├─► "Handle failures" ────────────────► qa-resilience
│ └─► Circuit breakers, retries, chaos
│
├─► "Refactor safely" ────────────────► qa-refactoring
│ └─► Characterization tests, seams
│
└─► "Check docs coverage" ────────────► qa-docs-coverage
└─► Gap analysis, runbook validation
Skill Registry (12 QA Skills)
技能注册表(12个QA技能)
Testing Skills (7)
测试技能(7个)
| Skill | Purpose | Key Triggers |
|---|---|---|
| Test pyramid, risk-based testing, coverage | "test strategy", "what tests", "coverage" |
| E2E web testing with Playwright | "E2E test", "Playwright", "browser test" |
| iOS testing with XCTest/XCUITest | "iOS test", "XCTest", "simulator" |
| Android testing with Espresso/UIAutomator | "Android test", "Espresso", "UIAutomator", "Compose test" |
| Cross-platform mobile testing | "mobile test", "cross-platform", "device matrix" |
| API schema and contract testing | "API test", "contract", "OpenAPI", "Pact" |
| LLM agent and persona testing | "agent test", "LLM test", "refusal", "scoring" |
| 技能 | 用途 | 关键触发词 |
|---|---|---|
| 测试金字塔、基于风险的测试、测试覆盖 | "test strategy", "what tests", "coverage" |
| 使用Playwright进行E2E Web测试 | "E2E test", "Playwright", "browser test" |
| 使用XCTest/XCUITest进行iOS测试 | "iOS test", "XCTest", "simulator" |
| 使用Espresso/UIAutomator进行Android测试 | "Android test", "Espresso", "UIAutomator", "Compose test" |
| 跨平台移动测试 | "mobile test", "cross-platform", "device matrix" |
| API schema和契约测试 | "API test", "contract", "OpenAPI", "Pact" |
| LLM Agent和角色测试 | "agent test", "LLM test", "refusal", "scoring" |
Quality Skills (5)
质量技能(5个)
| Skill | Purpose | Key Triggers |
|---|---|---|
| Debugging, logging, profiling | "debug", "error", "stack trace", "profile" |
| Metrics, traces, logs, SLOs | "monitor", "tracing", "SLO", "OpenTelemetry" |
| Circuit breakers, retries, chaos | "circuit breaker", "retry", "chaos", "timeout" |
| Safe refactoring, tech debt | "refactor", "code smell", "tech debt" |
| Documentation quality gates | "docs coverage", "undocumented", "runbook" |
| 技能 | 用途 | 关键触发词 |
|---|---|---|
| 调试、日志、性能分析 | "debug", "error", "stack trace", "profile" |
| 指标、追踪、日志、SLO | "monitor", "tracing", "SLO", "OpenTelemetry" |
| 断路器、重试、混沌工程 | "circuit breaker", "retry", "chaos", "timeout" |
| 安全重构、技术债务管理 | "refactor", "code smell", "tech debt" |
| 文档质量管控 | "docs coverage", "undocumented", "runbook" |
Canonical Registry (Source of Truth)
标准注册表(事实来源)
Use as the canonical list of QA skills, triggers, expected outputs, and routing rules.
frameworks/shared-skills/skills/router-qa/data/skill-registry.jsonUse for optional web-search references (each specialized skill maintains its own sources as needed).
frameworks/shared-skills/skills/router-qa/data/sources.json请使用 作为QA技能、触发词、预期输出和路由规则的标准列表。
frameworks/shared-skills/skills/router-qa/data/skill-registry.json请使用 作为可选的网页搜索参考(每个专业技能可根据需要维护自己的来源)。
frameworks/shared-skills/skills/router-qa/data/sources.jsonDomain Detection
领域检测
Domain 1: Test Planning
领域1:测试规划
Triggers: "what tests", "test strategy", "coverage", "test pyramid", "shift-left", "risk-based"
Route to:
qa-testing-strategyExample questions:
- "What tests do I need for this API?"
- "How do I prioritize testing?"
- "What's the right test coverage target?"
触发词:"what tests", "test strategy", "coverage", "test pyramid", "shift-left", "risk-based"
路由至:
qa-testing-strategy示例问题:
- "What tests do I need for this API?"
- "How do I prioritize testing?"
- "What's the right test coverage target?"
Domain 2: E2E & UI Testing
领域2:E2E与UI测试
Triggers: "E2E", "end-to-end", "Playwright", "browser test", "UI test", "page object", "visual test"
Route to:
qa-testing-playwrightExample questions:
- "Write Playwright tests for login"
- "How to handle flaky E2E tests?"
- "Best practices for page objects?"
触发词:"E2E", "end-to-end", "Playwright", "browser test", "UI test", "page object", "visual test"
路由至:
qa-testing-playwright示例问题:
- "Write Playwright tests for login"
- "How to handle flaky E2E tests?"
- "Best practices for page objects?"
Domain 3: Mobile Testing
领域3:移动测试
Triggers: "iOS", "Android", "mobile", "XCTest", "XCUITest", "Espresso", "UIAutomator", "Appium", "simulator", "emulator", "device"
| Trigger | Route |
|---|---|
| iOS-only | |
| Android-only | |
| Cross-platform | |
Example questions:
- "Test iOS app on simulator"
- "Write Espresso tests for Android login"
- "Test Jetpack Compose UI"
- "Device matrix for Android testing"
- "Cross-platform mobile test strategy"
触发词:"iOS", "Android", "mobile", "XCTest", "XCUITest", "Espresso", "UIAutomator", "Appium", "simulator", "emulator", "device"
| 触发词 | 路由目标 |
|---|---|
| 仅iOS | |
| 仅Android | |
| 跨平台 | |
示例问题:
- "Test iOS app on simulator"
- "Write Espresso tests for Android login"
- "Test Jetpack Compose UI"
- "Device matrix for Android testing"
- "Cross-platform mobile test strategy"
Domain 4: API & Contract Testing
领域4:API与契约测试
Triggers: "API test", "contract test", "OpenAPI", "GraphQL test", "gRPC", "Pact", "schema validation"
Route to:
qa-api-testing-contractsExample questions:
- "Write contract tests for REST API"
- "Validate OpenAPI schema"
- "Consumer-driven contract testing"
触发词:"API test", "contract test", "OpenAPI", "GraphQL test", "gRPC", "Pact", "schema validation"
路由至:
qa-api-testing-contracts示例问题:
- "Write contract tests for REST API"
- "Validate OpenAPI schema"
- "Consumer-driven contract testing"
Domain 5: Agent Testing
领域5:Agent测试
Triggers: "agent test", "LLM test", "persona", "refusal", "AI safety", "scoring rubric", "test harness"
Route to:
qa-agent-testingExample questions:
- "Create test suite for chatbot"
- "Test LLM refusal boundaries"
- "Score agent responses"
触发词:"agent test", "LLM test", "persona", "refusal", "AI safety", "scoring rubric", "test harness"
路由至:
qa-agent-testing示例问题:
- "Create test suite for chatbot"
- "Test LLM refusal boundaries"
- "Score agent responses"
Domain 6: Debugging
领域6:调试
Triggers: "debug", "error", "bug", "crash", "stack trace", "logging", "profiling", "troubleshoot"
Route to:
qa-debuggingExample questions:
- "Debug memory leak"
- "Analyze this stack trace"
- "Setup structured logging"
触发词:"debug", "error", "bug", "crash", "stack trace", "logging", "profiling", "troubleshoot"
路由至:
qa-debugging示例问题:
- "Debug memory leak"
- "Analyze this stack trace"
- "Setup structured logging"
Domain 7: Observability
领域7:可观测性
Triggers: "monitor", "metrics", "tracing", "logging", "SLO", "SLI", "OpenTelemetry", "APM", "alert"
Route to:
qa-observabilityExample questions:
- "Setup OpenTelemetry for Node.js"
- "Define SLOs for API"
- "Distributed tracing strategy"
触发词:"monitor", "metrics", "tracing", "logging", "SLO", "SLI", "OpenTelemetry", "APM", "alert"
路由至:
qa-observability示例问题:
- "Setup OpenTelemetry for Node.js"
- "Define SLOs for API"
- "Distributed tracing strategy"
Domain 8: Resilience
领域8:韧性
Triggers: "circuit breaker", "retry", "timeout", "backoff", "chaos", "fault injection", "degradation", "health check"
Route to:
qa-resilienceExample questions:
- "Implement circuit breaker"
- "Retry strategy for external APIs"
- "Setup chaos engineering"
触发词:"circuit breaker", "retry", "timeout", "backoff", "chaos", "fault injection", "degradation", "health check"
路由至:
qa-resilience示例问题:
- "Implement circuit breaker"
- "Retry strategy for external APIs"
- "Setup chaos engineering"
Domain 9: Refactoring
领域9:重构
Triggers: "refactor", "code smell", "tech debt", "legacy code", "characterization test", "strangler fig"
Route to:
qa-refactoringExample questions:
- "Refactor this legacy code safely"
- "Add tests before refactoring"
- "Manage technical debt"
触发词:"refactor", "code smell", "tech debt", "legacy code", "characterization test", "strangler fig"
路由至:
qa-refactoring示例问题:
- "Refactor this legacy code safely"
- "Add tests before refactoring"
- "Manage technical debt"
Domain 10: Documentation Quality
领域10:文档质量
Triggers: "docs coverage", "undocumented", "runbook", "API docs audit", "stale docs"
Route to:
qa-docs-coverageIf the user asks about CLAUDE.md/AGENTS.md/project memory/large codebase setup: route to (supporting: , )
claude-code-project-memoryqa-docs-coveragedocs-codebaseExample questions:
- "Audit documentation coverage"
- "Find undocumented APIs"
- "Validate runbooks"
- "Set up CLAUDE.md for large codebase"
- "Create AGENTS.md for cross-platform support"
触发词:"docs coverage", "undocumented", "runbook", "API docs audit", "stale docs"
路由至:
qa-docs-coverage如果用户询问CLAUDE.md/AGENTS.md/项目记忆/大型代码库设置:路由至(支持:, )
claude-code-project-memoryqa-docs-coveragedocs-codebase示例问题:
- "Audit documentation coverage"
- "Find undocumented APIs"
- "Validate runbooks"
- "Set up CLAUDE.md for large codebase"
- "Create AGENTS.md for cross-platform support"
Workflow Patterns
工作流模式
Pattern 1: Test-First Development
模式1:测试先行开发
text
START
│
▼
qa-testing-strategy ────────► Define test pyramid
│
├─► Unit tests ──────────► Write inline
├─► Integration tests ───► Write with mocks
└─► E2E tests ───────────► qa-testing-playwright
│
▼
qa-api-testing-contracts ──► Contract tests (if API)
│
▼
TESTS COMPLETEtext
START
│
▼
qa-testing-strategy ────────► Define test pyramid
│
├─► Unit tests ──────────► Write inline
├─► Integration tests ───► Write with mocks
└─► E2E tests ───────────► qa-testing-playwright
│
▼
qa-api-testing-contracts ──► Contract tests (if API)
│
▼
TESTS COMPLETEPattern 2: Bug Investigation
模式2:Bug调查
text
BUG REPORTED
│
▼
qa-debugging ──────────────► Analyze logs, traces, stack
│
├─► Need more visibility? → qa-observability
├─► Failure mode issue? ──→ qa-resilience
└─► Code quality issue? ──→ qa-refactoring
│
▼
ROOT CAUSE IDENTIFIED
│
▼
qa-testing-strategy ───────► Add regression test
│
▼
BUG FIXED + COVEREDtext
BUG REPORTED
│
▼
qa-debugging ──────────────► Analyze logs, traces, stack
│
├─► Need more visibility? → qa-observability
├─► Failure mode issue? ──→ qa-resilience
└─► Code quality issue? ──→ qa-refactoring
│
▼
ROOT CAUSE IDENTIFIED
│
▼
qa-testing-strategy ───────► Add regression test
│
▼
BUG FIXED + COVEREDPattern 3: Production Hardening
模式3:生产环境强化
text
PRE-PRODUCTION
│
▼
qa-resilience ─────────────► Error handling, retries
│
▼
qa-observability ──────────► Metrics, tracing, SLOs
│
▼
qa-testing-strategy ───────► Smoke + E2E tests
│
▼
PRODUCTION READY
│
▼
qa-resilience ─────────────► Chaos experiments (post-launch)text
PRE-PRODUCTION
│
▼
qa-resilience ─────────────► Error handling, retries
│
▼
qa-observability ──────────► Metrics, tracing, SLOs
│
▼
qa-testing-strategy ───────► Smoke + E2E tests
│
▼
PRODUCTION READY
│
▼
qa-resilience ─────────────► Chaos experiments (post-launch)Pattern 4: Legacy Modernization
模式4:遗留系统现代化
text
LEGACY CODEBASE
│
▼
qa-refactoring ────────────► Characterization tests
│
▼
qa-testing-strategy ───────► Add missing test coverage
│
▼
qa-refactoring ────────────► Incremental refactoring
│
▼
qa-docs-coverage ──────────► Document updated code
│
▼
MODERNIZEDtext
LEGACY CODEBASE
│
▼
qa-refactoring ────────────► Characterization tests
│
▼
qa-testing-strategy ───────► Add missing test coverage
│
▼
qa-refactoring ────────────► Incremental refactoring
│
▼
qa-docs-coverage ──────────► Document updated code
│
▼
MODERNIZEDPattern 5: LLM Agent Quality
模式5:LLM Agent质量
text
AGENT DEVELOPMENT
│
▼
qa-agent-testing ──────────► Define test scenarios
│
├─► Must-ace tasks ──────► Core functionality
├─► Refusal tests ───────► Safety boundaries
└─► Scoring rubric ──────► Quality metrics
│
▼
qa-observability ──────────► Token usage, latency metrics
│
▼
VALIDATED AGENTtext
AGENT DEVELOPMENT
│
▼
qa-agent-testing ──────────► Define test scenarios
│
├─► Must-ace tasks ──────► Core functionality
├─► Refusal tests ───────► Safety boundaries
└─► Scoring rubric ──────► Quality metrics
│
▼
qa-observability ──────────► Token usage, latency metrics
│
▼
VALIDATED AGENTPattern 6: Large Codebase Documentation (100K-1M LOC)
模式6:大型代码库文档(100K-1M LOC)
text
LARGE CODEBASE
│
▼
claude-code-project-memory ► Hierarchical CLAUDE.md setup
│ (root + subdirectory docs)
├─► Root CLAUDE.md ────────► Architecture, conventions
├─► Subdirectory docs ─────► Module-specific context
├─► AGENTS.md symlink ─────► Cross-platform support
│
▼
qa-docs-coverage ──────────► Audit existing documentation
│
▼
docs-codebase ─────────────► Fill critical gaps
│
▼
LLM-READY CODEBASEtext
LARGE CODEBASE
│
▼
claude-code-project-memory ► Hierarchical CLAUDE.md setup
│ (root + subdirectory docs)
├─► Root CLAUDE.md ────────► Architecture, conventions
├─► Subdirectory docs ─────► Module-specific context
├─► AGENTS.md symlink ─────► Cross-platform support
│
▼
qa-docs-coverage ──────────► Audit existing documentation
│
▼
docs-codebase ─────────────► Fill critical gaps
│
▼
LLM-READY CODEBASESkill Chains
技能链
Chain: Complete QA Setup
链:完整QA设置
qa-testing-strategy → qa-testing-playwright → qa-api-testing-contracts
↓
qa-resilience → qa-observability → qa-debugging
↓
qa-refactoring → qa-docs-coverageqa-testing-strategy → qa-testing-playwright → qa-api-testing-contracts
↓
qa-resilience → qa-observability → qa-debugging
↓
qa-refactoring → qa-docs-coverageChain: Incident Response
链:事件响应
qa-debugging → qa-observability → qa-resilience → qa-refactoringqa-debugging → qa-observability → qa-resilience → qa-refactoringChain: Mobile App Testing
链:移动应用测试
qa-testing-strategy → qa-testing-mobile → qa-testing-ios (if iOS) → qa-testing-android (if Android)qa-testing-strategy → qa-testing-mobile → qa-testing-ios (if iOS) → qa-testing-android (if Android)Quality Gates
质量门禁
Pre-Release Checklist
发布前检查清单
| Gate | Skill | Criteria |
|---|---|---|
| Test coverage | | Coverage targets aligned to risk and critical paths |
| E2E passing | | Critical paths green |
| API contracts | | Schema validation passing |
| Error handling | | Circuit breakers configured |
| Monitoring | | SLOs defined, alerts set |
| Docs | | API + README complete |
| 门禁 | 技能 | 标准 |
|---|---|---|
| 测试覆盖 | | 覆盖目标与风险和关键路径对齐 |
| E2E测试通过 | | 关键路径测试通过 |
| API契约 | | Schema验证通过 |
| 错误处理 | | 已配置断路器 |
| 监控 | | 已定义SLO,设置告警 |
| 文档 | | API + README完整 |
Post-Incident Checklist
事件后检查清单
| Gate | Skill | Action |
|---|---|---|
| Root cause | | Document findings |
| Regression test | | Add test for failure mode |
| Prevention | | Add/tune circuit breaker |
| Visibility | | Add missing traces/alerts |
| 门禁 | 技能 | 操作 |
|---|---|---|
| 根本原因 | | 记录调查结果 |
| 回归测试 | | 针对故障模式添加测试 |
| 预防措施 | | 添加/调整断路器 |
| 可见性 | | 添加缺失的追踪/告警 |
Routing Matrix
路由矩阵
| User Intent | Primary Skill | Supporting Skills |
|---|---|---|
| Plan tests | | |
| Write E2E | | |
| Test mobile | | |
| Test API | | |
| Test agent | | |
| Debug issue | | |
| Setup monitoring | | |
| Add resilience | | |
| Refactor code | | |
| Audit docs | | |
| Large codebase setup | | |
| 用户意图 | 主技能 | 支持技能 |
|---|---|---|
| 规划测试 | | |
| 编写E2E测试 | | |
| 移动应用测试 | | |
| API测试 | | |
| Agent测试 | | |
| 调试问题 | | |
| 设置监控 | | |
| 添加韧性 | | |
| 重构代码 | | |
| 审计文档 | | |
| 大型代码库设置 | | |
Cross-Router Handoffs
相关路由器
To router-engineering
—
When user needs implementation:
- "Build the feature" → Route to or
software-backendsoftware-frontend - "Implement the fix" → Route to relevant engineering skill
| 路由器 | 关系 |
|---|---|
| 父路由器;包含QA + DevOps + git |
| 实现任务的移交目标 |
| 业务/产品问题的移交目标 |
To router-operations
—
When user needs deployment/infra:
- "Deploy to production" → Route to
ops-devops-platform - "Setup CI/CD" → Route to
ops-devops-platform
—
From router-operations
—
When operations router detects QA needs:
- "Test strategy" → Route here
- "Debug production issue" → Route here
- "Add resilience" → Route here
—
Quick Reference Commands
—
| Need | Do This |
|---|---|
| Test strategy | → |
| E2E tests | → |
| iOS tests | → |
| Android tests | → |
| Mobile tests | → |
| API tests | → |
| Agent tests | → |
| Debug issue | → |
| Monitoring | → |
| Resilience | → |
| Refactoring | → |
| Doc quality | → |
—
Related Routers
—
| Router | Relationship |
|---|---|
| Parent router; includes QA + DevOps + git |
| Handoff target for implementation tasks |
| Handoff target for business/product questions |
—