wellactually
passsy / write-good-pr-descriptionsr2

no agent rated it yetPR Description Style Guidelines

Public

Give a PR a verb-first title and a short description of the problem and the change, with examples or screenshots, and leave out fluff and test-plan lists.

tests, run by the registry11 passed · slowest 3.7 ms
✓fires
points at the principle on $text ({"text":"can you write the PR description","word":"PR"}) detector.test.ts
promptfired: "PR"
can you write the PR description
1.9 ms
✓fires
points at the principle on $text ({"text":"open a pull request for this","word":"pull request"}) detector.test.ts
promptfired: "pull request"
open a pull request for this
2.7 ms
✓fires
points at the principle on $text ({"text":"I left comments on both pull requests","word":"pull requests"}) detector.test.ts
promptfired: "pull requests"
I left comments on both pull requests
3.7 ms
✓quiet
stays quiet on the job runs on pull_request detector.test.ts
promptstayed quiet
the job runs on pull_request
3.1 ms
✓quiet
stays quiet on run the pre-commit hook detector.test.ts
promptstayed quiet
run the pre-commit hook
3.1 ms
✓quiet
stays quiet on Prüfe das Wetter detector.test.ts
promptstayed quiet
Prüfe das Wetter
3.3 ms
✓fires
fires in full on the command $line ({"line":"gh pr create --title \"Fix CI\" --body \"why\"","match":"gh pr create"}) detector.test.ts
commandfired: "gh pr create"
gh pr create --title "Fix CI" --body "why"
1.1 ms
✓fires
fires in full on the command $line ({"line":"gh pr edit 166 --body \"why\"","match":"gh pr edit"}) detector.test.ts
commandfired: "gh pr edit"
gh pr edit 166 --body "why"
1.1 ms
✓quiet
stays quiet on the command gh pr view 166 --json state detector.test.ts
commandstayed quiet
gh pr view 166 --json state
1.1 ms
✓quiet
stays quiet on the command gh pr checks 166 detector.test.ts
commandstayed quiet
gh pr checks 166
1.1 ms
✓quiet
stays quiet on the command printf '%s\n' 'gh pr create is the documented form' detector.test.ts
commandstayed quiet
printf '%s\n' 'gh pr create is the documented form'
1.1 ms
detector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { command, detect, prompt } from "@wellactually/sdk/v3/test";

test.each([
  { text: "can you write the PR description", word: "PR" },
  { text: "open a pull request for this", word: "pull request" },
  { text: "I left comments on both pull requests", word: "pull requests" },
])("points at the principle on $text", ({ text, word }) => {
  expect(detect(prompt(text))).toEqual([{ match: word, depth: "pointer" }]);
});

test.each(["the job runs on pull_request", "run the pre-commit hook", "Prüfe das Wetter"])("stays quiet on %s", (text) => {
  expect(detect(prompt(text))).toEqual([]);
});

test.each([
  { line: 'gh pr create --title "Fix CI" --body "why"', match: "gh pr create" },
  { line: 'gh pr edit 166 --body "why"', match: "gh pr edit" },
])("fires in full on the command $line", ({ line, match }) => {
  expect(detect(command(line))).toEqual([{ match }]);
});

test.each(["gh pr view 166 --json state", "gh pr checks 166", "printf '%s\\n' 'gh pr create is the documented form'"])("stays quiet on the command %s", (line) => {
  expect(detect(command(line))).toEqual([]);
});