Skip to content

docs: document fetch_pr_review_context tool in review-dispatch plugin #696

Open

Description

@jflowers

Summary

The fetch_pr_review_context tool was added to the review-dispatch plugin in the opsx/fetch-pr-review-context change. This tool fetches all PR metadata needed for review dispatch in one deterministic call.

What Needs Documentation

  • New MCP tool: fetch_pr_review_context
  • Input schema: pr_number (positive integer 1-999999)
  • Output schema: structured JSON with PR metadata, CI checks, diff path, reviews, comments
  • Error codes: gh_not_found, gh_auth_failed, pr_not_found, api_error, timeout, rate_limited
  • Impact on uf init scaffold deployments (dual-copy sync)

Spec Reference

Spec: openspec/changes/fetch-pr-review-context/specs/fetch-pr-review-context.md

Context

Filed per AGENTS.md documentation gate: user-facing changes require a documentation issue before PR merge.

Activity

  1. added
    documentation
    on Oct 10, 2026
  2. added
    enhancement
    on Nov 2, 2026
  3. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Triage Summary

    Classification: VALID — enhancement (objective)

    The Divisor review panel assessed this issue across five personas (adversary, architect, curator, guard, sre). All five classify it as a valid, objective enhancement; the panel reports no dissent.

    Panel Findings

    • The capability exists and shipped. fetch_pr_review_context is implemented and registered in .opencode/plugins/review-dispatch/index.ts and merged via PR feat: add fetch_pr_review_context tool to review-dispatch plugin #697 from the opsx/fetch-pr-review-context change. The cited spec (openspec/changes/fetch-pr-review-context/specs/fetch-pr-review-context.md) resolves, and its FR-001 matches the issue summary.
    • The documentation gap is real. A search of docs/ (usage.md, cli-reference.md, configuration.md, architecture.md) returns zero mentions of fetch_pr_review_context. The only review-dispatch references in docs/ appear in an internal retrospective (learnings-review-2026-10.md), which is not user-facing reference documentation.
    • The issue satisfies the AGENTS.md documentation gate. The gate requires a documentation issue in the current repo for user-facing changes before PR merge; the CHANGELOG entry for the shipping change cites "Docs: docs: document fetch_pr_review_context tool in review-dispatch plugin #696", confirming this issue is the linked gate artifact.
    • The scaffold-impact claim is accurate. The plugin ships to uf init deployments via the mirror at internal/scaffold/assets/opencode/plugins/review-dispatch/index.ts, so the dual-copy sync impact belongs in the documentation scope.

    Implementation Note

    The input-schema summary in the issue body reflects the contract at filing time (2026-10-10). The later extend-fetch-pr-review-context change made pr_number optional (with current-branch resolution when omitted) and added PR-repair output fields (state, mergeable, merge_state_status, head_repository, base_repository). The documentation should describe the tool's current contract rather than the original schema quoted in the issue body.

    Related Issues

    The duplicate-candidate search surfaced two open issues in the same plugin family. Both cover different tool surfaces, so the panel classifies neither as a duplicate of this issue:

    The panel recommends composing this documentation with #873's sibling-tool docs into a shared review-dispatch tools reference where practical.

    Next Steps

    1. Document the fetch_pr_review_context tool contract — current input/output schemas and the structured error codes (gh_not_found, gh_auth_failed, pr_not_found, api_error, timeout, rate_limited) — in the appropriate docs/ reference page.
    2. Cover the uf init scaffold dual-copy sync impact.
    3. Apply the enhancement label (proposed by this triage).

    This triage was performed by the Divisor review panel.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions