Skip to content

Route PR reviews by area, stage, and design reviewer - #444

Open
eewing314 wants to merge 5 commits into
google:mainfrom
eewing314:feat/reviewer-routing
Open

eewing314 wants to merge 5 commits into
google:mainfrom
eewing314:feat/reviewer-routing

Conversation

@eewing314

@eewing314 eewing314 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary of Key Changes

Replaces heuristic maintainer assignment with a declarative ownership map in .github/reviewers.json, enforces @google/egm-maintainers membership on all assigned reviewers, preserves multi-reviewer continuity across open or merged Stage 1 PRs, and removes the pre-PR Feature Inquiry Issue (design-ready / pr-ready) step from the feature/design PR process:

  1. Declarative ownership map (.github/reviewers.json):
    • Defines egm_maintainers (with _egm_maintainers_comment explaining why the roster lives in CODEOWNERS-protected git config), fallback_team (egm-maintainers), max_individual_reviewers (3), new_design_docs_reviewers (["eewing314"]), new_root_dir_or_skill_reviewers (["eewing314"]), ignore_for_area_matching (distributions/**, README.md, docs/designs/README.md), and path-to-reviewer routes covering .github/**, .gemini/config.yaml/.gemini/styleguide.md, each skills/* + agents/*, contributions/**, TESTING.md + tests/**, and site/ + docs/ + platform adapters.
    • Protected by .github/CODEOWNERS (.github/** @google/egm-maintainers).
  2. Reviewer routing rules (.github/scripts/review_pr.py, .github/workflows/pr-triage-review.yml):
    • Stage 2 continuity: Resolves linked Stage 1 Design Doc PRs (open or merged, via direct #N PR refs, issue search, or docs/designs/<slug>.md) and inherits all trusted human reviewers and non-bot requested_reviewers, unioned with matched area routes.
    • Design docs (docs/designs/*.md, excluding README.md): Net-new design docs route to eewing314; updates to existing design docs parse @login authors from the doc header and filter to egm_maintainers.
    • New root-level dirs & net-new skills: Route unmatched paths introducing a new root directory or skills/<name>/ directory to eewing314.
    • Cross-cutting union, cap & fallback: Removes PLATFORM_TEXT_RE body/title prose guessing, excludes the PR author, restricts candidates to egm_maintainers, and falls back to @google/egm-maintainers when 0 or > 3 maintainers match.
    • post job validation: Updates pr-triage-review.yml (post job with contents: read) to validate plan.reviewers against .github/reviewers.json on default_branch (retaining Stage 1 review/request verification).
  3. Remove pre-PR Feature Issue gating (design-ready / pr-ready):
    • Removes .github/ISSUE_TEMPLATE/feature_proposal.md.
    • Updates CONTRIBUTING.md, AI_POLICY.md, AGENTS.md, .github/PULL_REQUEST_TEMPLATE.md, and .github/ISSUE_TEMPLATE/task.md so Track 2 starts directly with a Stage 1 Design Doc PR followed by a Stage 2 Implementation PR (keeping bug_report.md and task.md issues intact).

Contribution Type

Track: Feature / Architectural Change -- Stage 2: Implementation PR

Verification

  • pytest --tb=no tests/unit/test_pr_triage_review.py tests/unit/test_link_integrity.py: 22 passed, 1 skipped (test_post_job_script_harness_executes_cleanly skipped locally because node is not installed).
  • Full pytest --tb=no tests/unit: 385 passed, 3 skipped, 3 failed (0 Python failures; the 3 failures locally are the node-invoking tests test_ci_requires_successful_results[results0-True], test_ci_requires_successful_results[results4-True], and test_scope_advisory).
  • Dry-run comparison across all 37 open PRs (31 individual assignments, 6 @google/egm-maintainers fallbacks) posted in the PR comment below for review.

Human Accountability Affirmation

@eewing314
eewing314 requested a review from a team as a code owner November 14, 2026 21:53
@eewing314
eewing314 requested a review from quinnjim November 14, 2026 21:53
@eewing314

Copy link
Copy Markdown
Collaborator Author

Dry-run reviewer routing across all 37 open PRs (snapshot 2026-11-15)

Simulated select_handoff_reviewers / build_clean_handoff_plan cleanly with unassigned state (requested_reviewers=[], reviews=[]) using .github/reviewers.json against the current main tree:

  • Individual maintainer assignments (1–3 reviewers): 31 PRs
  • Team fallback (@google/egm-maintainers): 6 PRs (either > 3 matched maintainers or PR author excluded leaving 0)
PR Author Track Files (sample) Routed To Stage 1 Link Matched Routes / Notes
#446 @eewing314 Stage 2 Impl docs/site/skills/egm-lite.md, skills/egm-lite/SKILL.md (+2) @n3wth — routes: site_and_platform_adapters
#445 @eewing314 Stage 1 Design docs/designs/lite.md @google/egm-maintainers — design doc; team fallback (>3 or author-only)
#444 @eewing314 Stage 2 Impl .github/ISSUE_TEMPLATE/feature_proposal.md, .github/PULL_REQUEST_TEMPLATE.md (+9) @briansuchy — routes: github_ci_and_gemini_review_config, tests_and_contributions
#443 @abdulsabkrpet-pixel Bug Fix / Patch .github/scripts/README.md, 2026-11-14_DRIFT_REPORT.md (+13) @briansuchy, @n3wth — routes: github_ci_and_gemini_review_config, site_and_platform_adapters
#439 @SID-6921 Bug Fix / Patch .github/scripts/review_pr.py, tests/unit/test_pr_triage_review.py @briansuchy, @eewing314 — routes: github_ci_and_gemini_review_config, tests_and_contributions
#438 @njeunje Stage 2 Impl README.md, docs/site/skills.md (+13) @n3wth, @eewing314 #419 routes: tests_and_contributions, site_and_platform_adapters
#435 @n3wth Stage 1 Design docs/designs/README.md, docs/designs/egm_chat.md @eewing314 — design doc
#434 @n3wth Bug Fix / Patch contributions/eecs481/README.md, contributions/eecs481/hw2-test-expansion/submissions/test_sample_libpng_expansion.json (+4) @eewing314 — routes: tests_and_contributions
#430 @mitnick2012 Stage 1 Design docs/designs/README.md, docs/designs/bootstrap_language_packs.md @eewing314 — design doc
#419 @njeunje Stage 1 Design docs/designs/README.md, docs/designs/lite.md @eewing314 — design doc
#418 @rkfshakti Bug Fix / Patch distributions/claude/skills/egm-brainstorm/SKILL.md, distributions/claude/skills/egm-draft/SKILL.md (+3) @quinnjim, @eewing314, @briansuchy — design doc; routes: bootstrap_and_brainstorm, draft_skill
#416 @rkfshakti Bug Fix / Patch TESTING.md, docs/site/skills/egm-drift-report.md (+3) @eewing314, @n3wth — routes: tests_and_contributions, site_and_platform_adapters
#412 @atrearyan Bug Fix / Patch distributions/claude/docs/faq.md, distributions/claude/docs/getting_started.md (+2) @n3wth — routes: site_and_platform_adapters
#410 @Crispinvz Stage 1 Design docs/designs/README.md, docs/designs/recorded_decisions.md @eewing314 — design doc
#390 @atrearyan Bug Fix / Patch skills/egm-review-loop/TEST.md @briansuchy, @tearseb — routes: review_and_resolve_skills
#382 @briansuchy Stage 1 Design docs/designs/README.md, docs/designs/openspec.md @eewing314 — design doc
#372 @Yahiasherif002 Bug Fix / Patch docs/designs/bootstrap.md @briansuchy — design doc
#369 @briansuchy Stage 2 Impl distributions/claude/resources/execution_instructions.md, distributions/claude/skills/egm-bootstrap/SKILL.md (+23) @google/egm-maintainers — routes: bootstrap_and_brainstorm, review_and_resolve_skills, draft_skill, drift_report_skill, tests_and_contributions, site_and_platform_adapters; team fallback (>3 or author-only)
#365 @harshavarma02 Bug Fix / Patch site/README.md, site/src/components/CopyIcons.astro (+8) @n3wth — routes: site_and_platform_adapters
#363 @mehdishahdoost Stage 2 Impl .devin-plugin/plugin.json, adapters/devin/AGENTS.md (+6) @eewing314, @n3wth — routes: tests_and_contributions, site_and_platform_adapters
#361 @Dzuhaib Stage 2 Impl .gemini/config.yaml, .github/CODEOWNERS (+47) @google/egm-maintainers — routes: github_ci_and_gemini_review_config, bootstrap_and_brainstorm, review_and_resolve_skills, draft_skill, drift_report_skill, tests_and_contributions, site_and_platform_adapters; team fallback (>3 or author-only)
#359 @atrearyan Bug Fix / Patch distributions/claude/skills/egm-bootstrap/SKILL.md, docs/designs/bootstrap.md (+4) @briansuchy, @eewing314 — design doc; routes: bootstrap_and_brainstorm, tests_and_contributions
#350 @mathewgeejo Bug Fix / Patch distributions/claude/skills/egm-bootstrap/SKILL.md, distributions/claude/skills/egm-review-loop/SKILL.md (+4) @briansuchy, @tearseb — routes: bootstrap_and_brainstorm, review_and_resolve_skills
#349 @mathewgeejo Bug Fix / Patch .github/requirements-release.txt, .github/workflows/release.yml (+9) @briansuchy, @n3wth, @eewing314 — design doc; routes: github_ci_and_gemini_review_config, bootstrap_and_brainstorm, tests_and_contributions, site_and_platform_adapters
#344 @keithbinkly Bug Fix / Patch distributions/claude/skills/egm-review-loop/SKILL.md, docs/designs/review.md (+2) @tearseb, @briansuchy, @seanstappas — design doc; routes: review_and_resolve_skills
#335 @jbqubit Bug Fix / Patch distributions/claude/skills/egm-bootstrap/SKILL.md, distributions/claude/skills/egm-bootstrap/references/unsupported-source-check.md (+6) @briansuchy, @eewing314 — design doc; routes: bootstrap_and_brainstorm, tests_and_contributions
#334 @bevinkatti Stage 2 Impl .github/workflows/issue-triage.yml, tests/issue_triage.cjs (+1) @briansuchy, @eewing314 — routes: github_ci_and_gemini_review_config, tests_and_contributions
#313 @vshvedov Stage 1 Design docs/designs/README.md, docs/designs/precommit_review.md @eewing314 — design doc
#312 @vshvedov Stage 1 Design docs/designs/README.md, docs/designs/diagnose.md @eewing314 — design doc
#310 @Aaravkhanal Stage 1 Design docs/designs/README.md, docs/designs/antigravity_runtime_packaging.md @eewing314 — design doc
#298 @smituparmar01 Stage 2 Impl .windsurf/rules/egm.md, .windsurf/workflows/egm-ask.md (+23) @google/egm-maintainers #218 design doc; routes: tests_and_contributions, site_and_platform_adapters; team fallback (>3 or author-only)
#293 @vshvedov Stage 2 Impl .claude-plugin/agents/precommit_reviewer.md, .claude-plugin/plugin.json (+30) @n3wth, @kolla, @eewing314 #313 design doc; routes: tests_and_contributions, site_and_platform_adapters
#292 @vshvedov Stage 2 Impl .claude-plugin/agents/bug_diagnosis.md, .claude-plugin/plugin.json (+31) @n3wth, @briansuchy, @eewing314 #312 design doc; routes: tests_and_contributions, site_and_platform_adapters
#291 @atrearyan Bug Fix / Patch agents/codebase_details.md, agents/comprehension.md (+17) @google/egm-maintainers — routes: bootstrap_and_brainstorm, review_and_resolve_skills, tests_and_contributions, site_and_platform_adapters; team fallback (>3 or author-only)
#287 @YashDayani Bug Fix / Patch docs/designs/architecture.md, docs/designs/review.md (+1) @google/egm-maintainers — design doc; team fallback (>3 or author-only)
#246 @shirsoft Bug Fix / Patch distributions/claude/skills/egm-bootstrap/SKILL.md, distributions/claude/skills/egm-bootstrap/references/worker-return.schema.json (+5) @briansuchy, @eewing314 — design doc; routes: bootstrap_and_brainstorm, tests_and_contributions
#228 @barkhagvalani Stage 1 Design docs/designs/README.md, docs/designs/explain.md @eewing314 — design doc

Comment thread .github/reviewers.json
@@ -0,0 +1,148 @@
{
"version": 1,
"egm_maintainers": [

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to re-define this list, don't we have a variable saved somewhere in GitHub with this list?

@n3wth n3wth changed the title Automate reviewer routing by PR area, stage, and design reviewer Route PR reviews by area, stage, and design reviewer Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants