Skip to content

docs: add commit body convention to project rule files#74

Merged
singyichen merged 5 commits into
mainfrom
docs/commit-body-convention
Jun 11, 2026
Merged

docs: add commit body convention to project rule files#74
singyichen merged 5 commits into
mainfrom
docs/commit-body-convention

Conversation

@singyichen

Copy link
Copy Markdown
Owner

Summary

  • Extend the Commit Convention in CLAUDE.md with a subject + body format: subject ≤ 72 chars in imperative mood; body bullets explain the why (motivation, constraint, tradeoff) instead of restating the diff file-by-file
  • Define when a body is required: feat/refactor commits, or any diff touching ≥ 3 files; small fix/docs/chore commits may stay subject-only
  • Add the one-logical-change-per-commit rule (e.g. new tooling + doc version bump must be two commits)
  • Add a pointer in AGENTS.md Required Behaviors so non-Claude agents (Codex, etc.) follow the same convention
  • Update .claude/commands/pr-flow.md Step 1 to reference the convention (cross-reference consistency)

Changed Files

File Change
CLAUDE.md Expanded Commit Convention section: format template + body-required rule
AGENTS.md Added commit convention bullet to Required Behaviors
.claude/commands/pr-flow.md Added convention pointer under Step 1 — Commit

Test Plan

  • Docs-only change — no code/test impact (Step 3 skipped per pr-flow)
  • Cross-reference consistency checked: CLAUDE.md / AGENTS.md / pr-flow.md all state the same body-required rule
  • code-review skill (low) on the branch diff: no findings
  • Anchor link CLAUDE.md#commit-convention resolves to the ### Commit Convention heading

🤖 Generated with Claude Code

singyichen and others added 2 commits June 11, 2026 11:12
- Subject-only commits made multi-file changes hard to trace; bodies must now explain the why, not restate the diff
- Body is required for feat/refactor commits, or any commit touching 3+ files
- AGENTS.md gets a one-line pointer so non-Claude agents follow the same rule

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Complete ✅

This documentation update successfully extends the commit convention guidance across project rule files. All changes are consistent, well-structured, and maintain proper cross-references.

Changes Verified:

  • ✅ Commit body format documented with clear template (subject + body bullets)
  • ✅ Body-required rule consistently applied (feat/refactor or ≥3 files)
  • ✅ One-logical-change-per-commit rule added
  • ✅ Cross-reference from pr-flow.md to CLAUDE.md#commit-convention works correctly

No blocking issues found. The documentation improvements are ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the commit convention guidelines across several documentation files, including .claude/commands/pr-flow.md, AGENTS.md, and CLAUDE.md. It mandates that commits represent a single logical change and details when a commit body (explaining the "why") is required—specifically for feat and refactor types, or any diff touching three or more files. Feedback on the changes suggests clarifying that small commits of other types (such as test, style, perf, and ci) can also be subject-only to eliminate ambiguity.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread CLAUDE.md Outdated
singyichen and others added 3 commits June 11, 2026 11:36
- The type/file-count threshold kept producing technically compliant but
  opaque subject-only commits; user chose to drop the threshold entirely
- pr-flow examples updated to multi -m form so the template itself
  cannot produce a subject-only commit

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@singyichen singyichen merged commit 6c3ce49 into main Jun 11, 2026
8 checks passed
@singyichen singyichen deleted the docs/commit-body-convention branch June 11, 2026 04:05
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