Skip to content

[refactoring] Expand shared/pr-code-review-config.md adoption to cover more PR review workflows #25453

@github-actions

Description

@github-actions

Skill Overview

shared/pr-code-review-config.md already exists and provides cache-memory, GitHub PR tools (pull_requests, repos toolsets), and create-pull-request-review-comment / submit-pull-request-review safe-outputs. However, only 3 workflows (grumpy-reviewer, pr-nitpick-reviewer, security-review) currently import it. At least 4 more PR-triggered code review workflows independently re-define the same tools and safe-output patterns rather than importing this shared component.

Current Usage

Workflows that already import shared/pr-code-review-config.md:

  • grumpy-reviewer.md
  • pr-nitpick-reviewer.md
  • security-review.md

Workflows that perform PR code review but do not import it:

  • ci-doctor.md — posts PR check diagnoses via add-comment, uses cache-memory: true, github: tools
  • design-decision-gate.md — reviews PR diffs for ADR compliance; has nearly-identical github:, bash: tool block
  • approach-validator.md — validates PR approaches, has github: tools, posts review comments
  • test-quality-sentinel.md — reviews test quality in PRs; defines git diff:*, git log:*, github:, submit-pull-request-review inline

Proposed Enhancement

Extend shared/pr-code-review-config.md with a brief section documenting the submit-pull-request-review pattern (already present) and ensure the following workflows adopt it:

File: .github/workflows/shared/pr-code-review-config.md (existing — extend, not replace)

The shared component already provides:

tools:
  cache-memory: true
  github:
    toolsets: [pull_requests, repos]
safe-outputs:
  create-pull-request-review-comment:
    side: "RIGHT"
  submit-pull-request-review:
    max: 1

Usage Example:

# In a PR review workflow
imports:
  - shared/github-guard-policy.md   # already in some
  - shared/pr-code-review-config.md # add this
  - shared/reporting.md

Impact

  • Workflows to migrate: 4 additional workflows
  • Lines saved: ~8-12 per workflow, ~32-48 total
  • Consistency benefit: All PR review agents will consistently use cache-memory to avoid repeating comments, have access to the same PR toolsets, and submit reviews in a unified format

Implementation Plan

  1. Review ci-doctor.md — identify inline config that duplicates pr-code-review-config and replace with import
  2. Review design-decision-gate.md — remove duplicated github: toolsets: [pull_requests, repos] + add import
  3. Review approach-validator.md — align its tool/safe-output config with shared component, add import
  4. Review test-quality-sentinel.md — replace inline submit-pull-request-review + git tools with import of both shared/pr-code-review-config.md and shared/git-bash-tools.md
  5. Consider adding git-bash-tools.md as a nested import within pr-code-review-config.md if git access is needed by all PR review workflows
  6. Run make recompile and verify all lock files regenerate cleanly
  7. Test at least one PR review workflow manually

Related Analysis

This recommendation comes from the Workflow Skill Extractor analysis run on 2026-04-09. See also issue #25450 (shared/git-bash-tools.md) — test-quality-sentinel.md could benefit from both.

Generated by Workflow Skill Extractor · ● 2.6M ·

  • expires on Apr 11, 2026, 11:43 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions