From e9d54d5d9340fc33d9c60af64caf71c98e7f40f4 Mon Sep 17 00:00:00 2001 From: Wolfe-Jam Date: Thu, 12 Nov 2026 13:46:27 -0500 Subject: [PATCH] feat: A goose recipe that reviews pull requests - recipes/review-pr.yaml: checks out a pull request in its own worktree, runs verify and typecheck, reviews it against AGENTS.md and CONTRIBUTING.md (quotes, stages, sourced origin and dates, count sentences, confirmations, the page), and writes a report; never comments, merges or pushes - README: how to run it; "Works with goose" names both recipes Co-Authored-By: Claude Opus 5.5 --- README.md | 8 +++++++- recipes/review-pr.yaml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 recipes/review-pr.yaml diff --git a/README.md b/README.md index 001f472..3cd8b8f 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md). goose run --recipe recipes/recheck.yaml ``` -**Works with goose.** goose reads `AGENTS.md` first. When the weekly verify opens a `drift` issue, run the recipe: goose finds the current wording in the project's own repository, updates the data file and re-runs verify. It doesn't commit; you review the change. +- [`recipes/review-pr.yaml`](recipes/review-pr.yaml) is a goose recipe that reviews a pull request against AGENTS.md and CONTRIBUTING.md, with verify and typecheck, in its own worktree. Report only: + + ```sh + goose run --recipe recipes/review-pr.yaml --params pr= + ``` + +**Works with goose.** goose reads `AGENTS.md` first. When the weekly verify opens a `drift` issue, run `recheck.yaml`: goose finds the current wording in the project's own repository, updates the data file and re-runs verify. Pull requests are reviewed with `review-pr.yaml` before they're merged. Neither commits or comments; you review and merge. ## Data diff --git a/recipes/review-pr.yaml b/recipes/review-pr.yaml new file mode 100644 index 0000000..068e273 --- /dev/null +++ b/recipes/review-pr.yaml @@ -0,0 +1,36 @@ +version: "1.0.0" +title: Review a pull request to the AAIF stack map +description: Checks out a pull request in a separate worktree, runs verify and typecheck, reviews the change against AGENTS.md and CONTRIBUTING.md, and writes a short report. Report only. +parameters: + - key: pr + input_type: string + requirement: required + description: The pull request number to review +instructions: | + You are reviewing pull request #{{ pr }} to the AAIF stack map. Read AGENTS.md and CONTRIBUTING.md first and judge the change by them. + Report only: never comment on, approve, merge, push to or edit the pull request, and change no file in the main checkout. + Never invent a quote, stage or date. A finding must point at a file and line, or at a command's output. +prompt: | + 1. Read the pull request: `gh pr view {{ pr }} --json title,author,body,files` and `gh pr diff {{ pr }}`. + 2. Check it out in its own worktree so the main checkout is untouched: + `git fetch origin pull/{{ pr }}/head:review-{{ pr }}` then `git worktree add .cache/review-{{ pr }} review-{{ pr }}`. + 3. In that worktree run `bun install` (if `bun.lock` changes, it was your Bun, not the pull request: note it and run `git checkout bun.lock`), + then `bun scripts/verify.ts` and `bunx tsc --noEmit`. Keep the full output. + 4. Review the change: + - Links (`data/links.json`): each quote is in the source file, copied as a reader sees it, from that project's own docs on its default branch; the title and kind say no more than the quote does; a seam is labelled as the map's own wording. + - Projects (`data/projects.json`): stages only from the aaif/technical-committee table; origin and joined only from a cited source (AGENTS.md rule 7). + - Counts and dates: if the change makes a sentence listed in CONTRIBUTING ("Sentences that state counts and dates") wrong, it updates it. + - Confirmations (`confirmed/.md`): the file name is a project id in data/projects.json; the details match the map as of the pull request; the handle after `Verified by: @` is the pull request's author (from step 1). A confirmation needs nothing else: don't ask a confirmer for verify output. + - Page (`index.html`): data changes go in data files, not the page; anything that could break keyboard use, phones or the panel. + - Docs: every statement matches what the code and data do. + 5. Write the report to `.cache/review-pr-{{ pr }}.md` and print it: + - first line `# Review (goose): pull request #{{ pr }}` + - verdict first: merge / merge after fixes / don't merge + - findings, most important first: file:line, what's wrong, a suggested fix, and how likely a reader or contributor meets it (common / plausible / contrived) + - the verify and typecheck results (pass counts; any failure in full) + - what you did not check + 6. Clean up: `git worktree remove .cache/review-{{ pr }}` and `git branch -D review-{{ pr }}`. +extensions: + - type: builtin + name: developer + timeout: 300