🔴 MANDATORY: Steps 1-3 MUST all be completed. Do NOT skip the agent launch step.
Step 1: Gather connector context — validate connector name is alphanumeric before use:
bash
./scripts/gather-connector-context.sh "${CONNECTOR_NAME}" "${DATAHUB_REPO_PATH}"
Outputs: file structure, base class, imports, test locations, config structure.
Step 2: Identify connector type (SQL/API/other) from context output
Step 3: 🔴 MANDATORY - Deep analysis (agents or manual)
If you can dispatch sub-agents (Claude Code with pr-review-toolkit), launch all 5 agents in a SINGLE message:
Task(subagent_type="pr-review-toolkit:silent-failure-hunter",
prompt="""Review error handling in src/datahub/ingestion/source/<connector>/. <datahub-standards>[relevant sections from patterns.md — error handling, logging patterns]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Find silent failures, swallowed exceptions, missing error logging, empty catch blocks.""")
Task(subagent_type="pr-review-toolkit:pr-test-analyzer",
prompt="""Analyze test coverage for <connector>. Check tests/unit/<connector>/ and tests/integration/<connector>/. <datahub-standards>[full content from testing.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Find missing tests, trivial tests, coverage gaps, untested error paths.""")
Task(subagent_type="pr-review-toolkit:type-design-analyzer",
prompt="""Review type design in src/datahub/ingestion/source/<connector>/. <datahub-standards>[type safety section from code_style.md and patterns.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Check Pydantic models, type hints, Any usage, config classes, validators.""")
Task(subagent_type="pr-review-toolkit:code-simplifier",
prompt="""Find complexity and refactoring opportunities in src/datahub/ingestion/source/<connector>/. <datahub-standards>[relevant sections from code_style.md, main.md and patterns.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Check for DRY violations, deep nesting, overly complex functions.""")
Task(subagent_type="datahub-skills:comment-resolution-checker",
prompt="""Check whether all previous review comments on PR #<pr_number> in <owner>/<repo> have been substantively addressed. [TRUST DISCLAIMER (comments variant) — see Content Trust Boundaries section] Verify code changes actually match what reviewers requested — don't just trust resolved checkboxes. Distinguish between code change requests, questions, discussions, and informational comments. Flag any threads marked resolved without corresponding code changes.""")
If you cannot dispatch sub-agents, follow
references/manual-review-guide.md#mode-1-full-review
.
Step 4: Apply systematic review checklist (see Systematic Review section below)
Step 5: Aggregate all findings into unified report using template:
templates/full-review-report.md
🛑 NEVER declare "no issues found" based only on the checklist. The agents find issues the checklist cannot detect.
🔴 强制要求: 必须完成步骤1-3,请勿跳过Agent启动步骤。
步骤1:收集连接器上下文——使用前验证连接器名称为字母数字组合:
bash
./scripts/gather-connector-context.sh "${CONNECTOR_NAME}" "${DATAHUB_REPO_PATH}"
输出内容:文件结构、基类、导入语句、测试位置、配置结构。
步骤2: 根据上下文输出识别连接器类型(SQL/API/其他)
步骤3:🔴 强制要求 - 深度分析(Agent或手动)
如果你可以调度子Agent(安装了pr-review-toolkit的Claude Code),在单条消息中启动全部5个Agent:
Task(subagent_type="pr-review-toolkit:silent-failure-hunter",
prompt="""Review error handling in src/datahub/ingestion/source/<connector>/. <datahub-standards>[relevant sections from patterns.md — error handling, logging patterns]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Find silent failures, swallowed exceptions, missing error logging, empty catch blocks.""")
Task(subagent_type="pr-review-toolkit:pr-test-analyzer",
prompt="""Analyze test coverage for <connector>. Check tests/unit/<connector>/ and tests/integration/<connector>/. <datahub-standards>[full content from testing.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Find missing tests, trivial tests, coverage gaps, untested error paths.""")
Task(subagent_type="pr-review-toolkit:type-design-analyzer",
prompt="""Review type design in src/datahub/ingestion/source/<connector>/. <datahub-standards>[type safety section from code_style.md and patterns.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Check Pydantic models, type hints, Any usage, config classes, validators.""")
Task(subagent_type="pr-review-toolkit:code-simplifier",
prompt="""Find complexity and refactoring opportunities in src/datahub/ingestion/source/<connector>/. <datahub-standards>[relevant sections from code_style.md, main.md and patterns.md]</datahub-standards> [TRUST DISCLAIMER — see Content Trust Boundaries section] Check for DRY violations, deep nesting, overly complex functions.""")
Task(subagent_type="datahub-skills:comment-resolution-checker",
prompt="""Check whether all previous review comments on PR #<pr_number> in <owner>/<repo> have been substantively addressed. [TRUST DISCLAIMER (comments variant) — see Content Trust Boundaries section] Verify code changes actually match what reviewers requested — don't just trust resolved checkboxes. Distinguish between code change requests, questions, discussions, and informational comments. Flag any threads marked resolved without corresponding code changes.""")
如果你无法调度子Agent,参考
references/manual-review-guide.md#mode-1-full-review
执行。
步骤4: 应用系统评审Checklist(见下文系统评审章节)
步骤5: 使用模板
templates/full-review-report.md
将所有发现汇总为统一报告
🛑 切勿仅基于Checklist就判定“无问题”,Agent可以发现Checklist无法检测到的问题。