Skip to content

Add focused review lenses to the PR review policy #33

@ssheld

Description

@ssheld

Summary

The current review policy is strong on severity, attribution, and broad review priorities, but it does not yet give reviewers a repeatable set of focused review passes or "lenses" to apply based on PR scope.

We should extend the review policy with optional but explicit review lenses so automated reviewers can be more consistent about what they check, especially for test gaps, documentation drift, simplification opportunities, and agent-specific safety risks.

Planning Metadata

  • Priority: Medium
  • Estimated effort: Small
  • Suggested order: 3 of 4, after the core workflow changes so review guidance can reflect the newer operating model

Why this matters

  • Today the review policy describes what matters, but not a compact operational review routine.
  • Different agents may produce uneven review depth even when reading the same policy.
  • Focused lenses would help reviewers cover subtle but recurring classes of risk without forcing every review into the same shape.
  • This is a good place to make security-sensitive and agent-safety-sensitive reviews more concrete without broadening into a separate security framework.

Proposed scope

  • Extend scaffold/agent-vault/review-policy.md with a Review Lenses or similarly named section.
  • Mirror the same change into:
    • AGENTS.md
    • scaffold/root/AGENTS.md
  • Define a small set of optional lenses reviewers can apply based on PR type, for example:
    • correctness and edge-case pass
    • failure/observability pass
    • test adequacy pass
    • documentation accuracy pass
    • simplification and design pass
    • security / agent-safety pass for sensitive changes
  • Clarify that these are prompts/checklists, not a requirement to leave separate comments for each lens.
  • Show when certain lenses should be emphasized, for example:
    • auth, secrets, permissions, model/tool execution -> security lens
    • refactors -> simplification/design lens
    • CLI or docs changes -> documentation accuracy lens
    • retries / timeouts / external integrations -> failure/observability lens

Candidate files

  • scaffold/agent-vault/review-policy.md
  • AGENTS.md
  • scaffold/root/AGENTS.md
  • Possibly README.md if the repo wants to advertise the richer review process explicitly

Candidate lens prompts

  • Did the PR change behavior that docs or templates still describe incorrectly?
  • Are there silent-failure paths, missing logs, or ambiguous rollback behavior?
  • Are tests covering the new edge conditions and failure paths?
  • Is the implementation more complex than necessary for the problem being solved?
  • Does the change increase model/tool surface area without clear validation or limits?

Open questions

  • Should lenses live directly under review-policy.md, or be linked from a separate checklist document?
  • How much repetition is useful before the policy becomes too heavyweight for small reviews?
  • Should the documentation accuracy lens explicitly instruct reviewers to check docs/design.md and README.md when relevant?

Non-goals

  • Do not add vendor-specific slash commands or review automation.
  • Do not require a reviewer to produce one comment per lens.
  • Do not replace the existing severity mapping or attribution rules.

Success criteria

  • Reviewers have a clearer repeatable structure for high-signal reviews.
  • The policy improves review consistency without becoming cumbersome.
  • Security-sensitive and agent-safety-sensitive changes have a more explicit review path.
  • Mirrored policy files stay synchronized.

Validation ideas

  • bash scripts/check-policy-mirrors.sh
  • Dry-run the updated policy against a recent PR to confirm the lenses are actionable rather than redundant.

Context

This issue comes from looking at useful patterns in Claude review-oriented plugins while keeping agent-vault vendor-neutral. The goal is to capture the useful review structure in policy, not to depend on Claude-specific commands.

Reference inspiration:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions