|
| 1 | +--- |
| 2 | +title: PR Description Quality Standards |
| 3 | +description: Ensures PR descriptions meet quality criteria for the cadence-samples (Go) repo using guidance from the PR template and .github/pull_request_guidance.md |
| 4 | +when: PR description is created or updated |
| 5 | +actions: Read PR template and guidance, then report requirement status |
| 6 | +--- |
| 7 | + |
| 8 | +# PR Description Quality Standards |
| 9 | + |
| 10 | +When evaluating a pull request description: |
| 11 | + |
| 12 | +1. **Read the PR template guidance** at `.github/pull_request_guidance.md` to understand the expected guidance for each section |
| 13 | +2. Apply that guidance to evaluate the current PR description |
| 14 | +3. Provide recommendations for how to improve the description. |
| 15 | + |
| 16 | +## Core Principle: Why Not How |
| 17 | + |
| 18 | +From https://cbea.ms/git-commit/#why-not-how: |
| 19 | +- **"A diff shows WHAT changed, but only the description can explain WHY"** |
| 20 | +- Focus on: the problem being solved, the reasoning behind the solution, context |
| 21 | +- The code itself documents HOW - the PR description documents WHY |
| 22 | + |
| 23 | +## Evaluation Criteria |
| 24 | + |
| 25 | +### Required Sections (must exist with substantive content per PR template guidance) |
| 26 | + |
| 27 | +1. **Which sample(s) or area?** (optional but recommended) |
| 28 | + - One line listing area(s) touched. This repo has two sample trees: **cmd/samples** (legacy; make + ./bin/…) and **new_samples** (per-folder; go run .). Identify which tree and area(s) are touched. |
| 29 | + - **cmd/samples:** e.g. cmd/samples/recipes/helloworld, cmd/samples/recipes/branch, cmd/samples/recipes/query, cmd/samples/batch, cmd/samples/cron, cmd/samples/expense, cmd/samples/fileprocessing, cmd/samples/dsl, cmd/samples/pso, cmd/samples/recovery, cmd/samples/recipes/cancelactivity, etc. |
| 30 | + - **new_samples:** hello_world, activities, query, signal, operations, client_tls, template. |
| 31 | + - **Other:** README, build, config, Makefile, common. |
| 32 | + - Helps reviewers route; skip flagging if area is obvious from paths |
| 33 | + |
| 34 | +2. **What changed?** |
| 35 | + - 1-2 line summary of WHAT changed technically |
| 36 | + - Focus on key modification, not implementation details |
| 37 | + - Link to GitHub issue encouraged for non-trivial changes; optional for trivial doc/sample tweaks |
| 38 | + - Template has good/bad examples |
| 39 | + |
| 40 | +3. **Why?** |
| 41 | + - Context and motivation (why not how) |
| 42 | + - Enough rationale for reviewers to understand the goal (e.g. improving clarity, fixing compatibility, aligning with docs) |
| 43 | + - Must explain WHY this approach was chosen |
| 44 | + |
| 45 | +4. **How did you test it?** |
| 46 | + - Concrete, copyable commands with exact invocations |
| 47 | + - GOOD: `make`, `go test ./...`, `go test ./cmd/samples/recipes/helloworld/`, `cd new_samples/hello_world && go run .`, and Cadence CLI commands as in sample READMEs |
| 48 | + - BAD: "Tested locally" or "See tests" |
| 49 | + - Expect Go/make and/or sample execution commands; no canary or integration server setup required |
| 50 | + |
| 51 | +5. **Potential risks** |
| 52 | + - Often N/A for sample-only or doc-only changes |
| 53 | + - Call out when relevant: dependency upgrades, behavior changes for someone copying the sample, build/config changes |
| 54 | + - Don't require lengthy text when N/A is appropriate |
| 55 | + |
| 56 | +6. **Release notes** |
| 57 | + - Optional for this repo. Use when change is user-facing (e.g. new sample, notable README change) |
| 58 | + - Can be N/A for internal refactors or tiny fixes |
| 59 | + - Don't require lengthy text when N/A is appropriate |
| 60 | + |
| 61 | +7. **Documentation Changes** |
| 62 | + - Often relevant when adding or changing samples (main README, cmd/samples READMEs, new_samples READMEs including generator-generated, links to cadence or cadence-docs) |
| 63 | + - Only mark N/A if certain no docs are affected |
| 64 | + |
| 65 | +### Quality Checks |
| 66 | + |
| 67 | +- **Skip obvious things** - Don't flag items clear from folder structure (e.g. area from paths) |
| 68 | +- **Skip trivial refactors** - Minor formatting/style changes don't need deep rationale |
| 69 | +- **Don't check automated items** - CI, linting are automated |
| 70 | + |
| 71 | +## FORBIDDEN - Never Include |
| 72 | + |
| 73 | +- "Issues Found", "Testing Evidence Quality", "Documentation Reasoning", "Summary" sections |
| 74 | +- "Note:" paragraphs or explanatory text outside recommendations |
| 75 | +- Grouping recommendations by type |
| 76 | + |
| 77 | +## Section Names (Use EXACT Brackets) |
| 78 | + |
| 79 | +- **[Which sample(s) or area?]** |
| 80 | +- **[What changed?]** |
| 81 | +- **[Why?]** |
| 82 | +- **[How did you test it?]** |
| 83 | +- **[Potential risks]** |
| 84 | +- **[Release notes]** |
| 85 | +- **[Documentation Changes]** |
0 commit comments