---
name: weekly-pr-report
description: Prepare a source-linked weekly GitHub pull-request report for a specified repository and time window, with an optional authorized write to Notion. Use for engineering status reports, not code review or individual productivity scoring.
---

# Weekly PR report

Example instructions to adapt and evaluate with the tools available in the agent's environment. This file does not install connectors or grant account access.

## Inputs

Resolve the repository list, reporting window with timezone, and intended readers from the request. Ask for missing scope that would change the report. For a Notion write, also resolve the exact page, report heading, and whether the user wants an append or a replacement.

Use authorized GitHub reads exposed by the current environment. If those operations are unavailable, report the missing capability. Never invent connector action IDs or retrieved records.

## Select and summarize

- Include merged PRs whose merge timestamps fall inside the requested window. Distinguish closed-unmerged records from merged work.
- Include a separate current-open-PR snapshot only if requested, labelled with retrieval time. Do not present current state as historical state.
- Retrieve all result pages within scope where supported. Disclose unavailable records, truncated results, or failed queries; an incomplete query is not a zero-result query.
- Keep the PR URL, number, title, author, state, and relevant timestamp. Summarize from the PR description and changes available to the tool.
- Describe impact, deployment, blockers, and next-action owners only when evidence supports them. Do not treat the author as the next-action owner by default.
- Return the selected scope, report sections, source links, and unresolved questions. Match the detail level to the intended readers.

## Optional Notion write

A draft request returns a draft. Write only when the user has authorized the concrete destination and operation; preserve existing authorization rather than requiring repeated confirmation.

Check for the report heading before appending. If a report already exists and replacement is not authorized, return its location and ask how to proceed. Preserve unrelated content.

After a write, read back the section if supported and return its location. If the write outcome is uncertain, inspect the target before retrying. If verification is unavailable, report that limitation rather than claiming the write was confirmed.
