Skip to content

doc: guide Claude to write concise inline comments#14038

Open
kim-em wants to merge 1 commit into
masterfrom
doc-claude-comment-guidance
Open

doc: guide Claude to write concise inline comments#14038
kim-em wants to merge 1 commit into
masterfrom
doc-claude-comment-guidance

Conversation

@kim-em

@kim-em kim-em commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a ## Comments section to the project .claude/CLAUDE.md, directing Claude Code to keep inline comments concise and reserve them for important, non-obvious facts about the code at hand. It discourages comments that restate the code or a general API contract, narrate prior or rejected behavior, or document API usage that belongs at the definition.

Prompted by discussion on the lean-fro Zulip about Claude attaching long, path-dependent comments at unremarkable call sites.

🤖 Prepared with Claude Code

This PR adds a `## Comments` section to the project `.claude/CLAUDE.md`, directing Claude Code to keep inline comments concise and reserve them for important, non-obvious facts about the code at hand. It discourages comments that restate the code or a general API contract, narrate prior or rejected behavior, or document API usage that belongs at the definition.

Prompted by discussion on the lean-fro Zulip about Claude attaching long, path-dependent comments at unremarkable call sites.

🤖 Prepared with Claude Code
@kim-em kim-em added the changelog-no Do not include this PR in the release changelog label Jun 13, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jun 13, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 67dffcab8ad7f50376e31e33611e51e3a21f042d --onto 659e8bb858995b0a1ada239c5b3819c8f8f2772f. You can force Mathlib CI using the force-mathlib-ci label. (2026-06-13 06:09:28)

@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 67dffcab8ad7f50376e31e33611e51e3a21f042d --onto 803553a556fd82fa1060efb0c43eda542130cb16. You can force reference manual CI using the force-manual-ci label. (2026-06-13 06:09:29)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-no Do not include this PR in the release changelog toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants