Skip to content

docs: add a contributing guide covering the pre-PR review workflow - #321

Draft
kkozik-amplify wants to merge 3 commits into
mainfrom
docs/contributing-guide
Draft

docs: add a contributing guide covering the pre-PR review workflow#321
kkozik-amplify wants to merge 3 commits into
mainfrom
docs/contributing-guide

Conversation

@kkozik-amplify

Copy link
Copy Markdown
Collaborator

Why

The README's Contributing section said "open a GitHub issue for anything sizable, then create a pull request" and nothing else. There was no statement of what a contributor should have checked before asking for review.

That matters more here than in most repos. The parser is bidirectional, so a change that looks correct in isolation can quietly break round-tripping in a different module — and fork PRs don't run CI until a maintainer approves the workflow, so for a first-time contributor the local run is often the only signal for a while.

What

Adds CONTRIBUTING.md and points the README at it. The workflow it documents:

  1. Make the change, with tests
  2. Get the full suite and pre-commit green locally
  3. Open a draft PR
  4. Run /review-pr <number> and act on the findings
  5. Mark ready for review

Draft first for two reasons: /review-pr works from a PR number rather than a working tree, so there has to be a PR; and draft status signals that human attention isn't wanted yet.

The guide describes what the skill actually checks (issue reproduction, CLAUDE.md compliance, per-area code review, tests + derived edge cases) and frames it as a first reviewer rather than a verdict — it's good at the mechanical checks and it can also be wrong.

It also records two things that reliably confuse people:

  • no-commit-to-branch fails during pre-commit run --all-files whenever main is checked out. That hook exists to block commits to main, so failing there is intended, not a defect.
  • CI doesn't run on fork PRs until a maintainer approves the workflow.

One correction worth noting

I initially documented pre-commit run --files $(git diff --name-only origin/main). Running it against this very PR showed it checked only README.mdgit diff doesn't list untracked files, so the brand-new CONTRIBUTING.md was silently skipped. The guide now says to git add -A and run bare pre-commit run, which checks staged files, and explains why the --files form is a trap.

Test plan

  • python -m unittest discover -s test -p "test_*.py" — 1504 passing (docs-only change, run for completeness)
  • git add -A && pre-commit run — all hooks pass, including mdformat on both changed files
  • Verified test-requirements.txt exists as referenced, and that the documented pre-commit invocation covers a newly added file

Docs only; no code paths touched.

kkozik-amplify and others added 3 commits August 24, 2026 20:03
The README pointed contributors at "open a PR" with no mention of how to
check their work first. This parser is bidirectional, so a change that
looks right in isolation can break round-tripping somewhere else in the
pipeline; the guide front-loads that.

Documents the intended sequence: get the suite and pre-commit green
locally, open a draft PR, verify it with /review-pr, then mark it ready.
Draft first because the skill reviews a PR number rather than a working
tree, and because it signals no human attention is wanted yet.

Also records two things that reliably confuse people: no-commit-to-branch
failing by design during --all-files on main, and fork PRs not running CI
until a maintainer approves the workflow, which is why the local run
carries the weight.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two additions. Under Pre-commit Checks, the staged-files invocation and
the no-commit-to-branch caveat, both of which cost time to rediscover.
Under Keeping Docs Current, CONTRIBUTING.md joins the list of docs that
have to move when the workflow does -- a stale command in the contributor
entry point is worse than a stale line in CLAUDE.md, since a contributor
has no way to know it is wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two problems with the first draft.

A bare `/review-pr` means nothing to someone who has never used Claude
Code, and the README mentioned it with no indication of what it even was.

Worse, it sat as step 4 of a five-step workflow, which read as gating
contribution on a specific paid tool. This repo takes PRs from outside
contributors; that is not a bar we want.

The requirement is now the checklist itself, written so it can be worked
by hand. The skill is presented as an automated shortcut for people who
happen to have it, with an explicit note that nothing here needs Claude
Code and no PR is held up for lacking it.

The checklist is drawn from what has actually slipped through on this
repo, led by "does your test fail without your source change" -- that one
alone has caught a test asserting an unreachable value and another that
never exercised the code path it named.

Also notes that maintainers may run the skill during review, so a
contributor can see up front what it will look for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant