Skip to content

docs: GitHub Issue引用ルールとClaude Code設定を追加 - #47

Merged
susumutomita merged 2 commits into
mainfrom
docs/update-issue-reference-guidelines
Nov 18, 2025
Merged

susumutomita merged 2 commits into
mainfrom
docs/update-issue-reference-guidelines

Conversation

@susumutomita

@susumutomita susumutomita commented Nov 18, 2025 •

Copy link
Copy Markdown
Owner

概要

GitHub Issue引用のベストプラクティスとClaude Code用の設定ファイルを追加しました。

変更内容

  • CLAUDE.md: Issue引用ルールを追加
    • コミットメッセージやPR本文で #番号 形式の引用を避けるガイドライン
    • GitHub自動リンクによる関連Issueへのノイズ防止が目的
  • Claude Code設定:
    • .claude/settings.json: プロジェクト設定
    • .claude/commands/suggest-claude-md.md: CLAUDE.md提案用スラッシュコマンド
    • .claude/developers/susumutomita.md: 開発者プロファイル

テスト

  • ドキュメント変更のみのため、ビルドテスト不要

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated contributor guidelines to avoid numeric issue references and added explicit alternatives.
    • Added a developer profile template for recording developer preferences, tools, and coding conventions.
  • Chores

    • Added an internal command that analyzes conversation history and proposes CLAUDE.md updates.
    • Configured hooks to run the suggestion command on session end and before compaction.

- CLAUDE.mdにIssue引用のベストプラクティスを追加
  - コミットメッセージやPR本文で `#番号` 形式の引用を避けるルール
  - GitHub自動リンクによるノイズ防止のため
- Claude Code用の設定ファイルを追加
  - .claude/settings.json: プロジェクト設定
  - .claude/commands/suggest-claude-md.md: CLAUDE.md提案用コマンド
  - .claude/developers/susumutomita.md: 開発者プロファイル

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2025 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new suggest-claude-md command spec, a developer profile template, and settings to run the suggestion hook on SessionEnd and PreCompact; also inserts two "Issue 引用のルール:" doc blocks into CLAUDE.md.

Changes

Cohort / File(s) Summary
Suggest command & hook config
.claude/commands/suggest-claude-md.md, .claude/settings.json
New command spec describing /suggest-claude-md analysis triggers (project rules, repeated instructions, cross-sectional consistency), required output format, prohibited content, scoring rubric, and post-execution steps. Settings add SessionEnd and PreCompact hooks to run the suggestion hook.
Developer profile template
.claude/developers/susumutomita.md
New developer profile markdown capturing contact, coding style, tools/workflows, design principles, anti-patterns, notes, and learning/growth items; marked for automatic updates from coding conversations.
CLAUDE.md updates
CLAUDE.md
Inserted two identical "Issue 引用のルール:" blocks that prohibit #番号 issue references in commits/PR bodies and recommend full URLs or writing "Issue 番号".

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Session as Session
  participant HookRunner as Hook Runner (bin/suggest-claude-md-hook.sh)
  participant SuggestCmd as /suggest-claude-md
  participant CLAUDE as CLAUDE.md
  participant Repo as Repo (PR workflow)

  Note over Session,HookRunner `#D6EAF8`: Trigger events\n(SessionEnd / PreCompact)
  Session->>HookRunner: emit event (SessionEnd / PreCompact)
  HookRunner->>SuggestCmd: invoke analysis (conversation history)
  SuggestCmd->>SuggestCmd: analyze triggers\n(project rules, repeats, consistency)
  alt proposal generated
    SuggestCmd->>CLAUDE: produce proposed CLAUDE.md additions (formalized output)
    SuggestCmd->>Repo: create/update suggestion artifacts (include in PR)
  else no changes
    SuggestCmd->>HookRunner: return "no new content"
  end
  Note over Repo,CLAUDE `#F9E79F`: Post-execution: review & team approval
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review the command spec for precise required output format and edge cases.
  • Verify hook wiring in .claude/settings.json matches existing hook runner expectations.
  • Confirm duplicate "Issue 引用のルール:" placements in CLAUDE.md are intentional or should be consolidated.

Possibly related PRs

Poem

🐇 I hopped through chat and found a clue,
A little script that knows what’s new,
It nudges CLAUDE, suggests a line,
Then tucks the note and sips my thyme,
Hop, review, merge — the doc will shine! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding GitHub Issue reference rules and Claude Code configuration settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce3fa8d and dabfec3.

📒 Files selected for processing (1)
  • CLAUDE.md (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude

claude Bot commented Nov 18, 2025

Copy link
Copy Markdown

Code Review: PR #47

Summary

This PR adds GitHub Issue reference guidelines to CLAUDE.md and introduces Claude Code configuration files. Overall, this is a documentation-focused change that establishes helpful conventions for the project.


Code Quality and Best Practices

Strengths:

  • Clear documentation with well-structured explanations
  • Good reasoning provided for the Issue reference rule (avoiding noise in related Issues)
  • The slash command template (suggest-claude-md.md) is comprehensive with clear examples

Suggestions:

  1. Developer profile template (.claude/developers/susumutomita.md):

    • The file is mostly empty placeholders. Consider either:
      • Filling in actual values for the developer profile, or
      • Moving this to a template file (e.g., susumutomita.md.template) until it is populated
    • Empty sections do not provide value and may clutter the repository
  2. Settings.json structure (.claude/settings.json):

    • The hook configuration has unnecessary nesting. Current structure:
      "SessionEnd": [{ "hooks": [{ "type": "command", ... }] }]
    • Consider verifying this matches Claude Code expected schema, as the double-array wrapping seems unusual

Potential Issues

  1. Hook script dependency:

    • The settings reference bin/suggest-claude-md-hook.sh
    • While this file exists in the repository (bin/suggest-claude-md-hook.sh), it is not included in this PR
    • This could cause confusion for reviewers trying to understand the full picture
    • Recommendation: Consider noting in the PR description that this depends on an existing script, or include its contents for context
  2. Issue reference rule may be too restrictive:

    • Preventing #123 syntax removes a widely-used GitHub feature for automatic issue linking
    • The "noise" concern is valid, but many teams find the automatic cross-references valuable for traceability
    • Suggestion: Consider documenting when it is acceptable (e.g., "Use #123 only when you want to create a visible reference in the linked issue")

Security Concerns

  • No security issues identified
  • The hook executes a local script, which is appropriate for development tooling

Test Coverage

  • As noted in the PR, this is documentation-only and does not require test coverage
  • This is appropriate for the scope of changes

Additional Observations

  1. Consistency: The CLAUDE.md update aligns well with the existing document style and formatting

  2. Future consideration: The developer profile system (.claude/developers/*.md) could be a valuable pattern, but establishing a clear workflow for keeping these profiles updated would help ensure they remain useful


Verdict

Approve with minor suggestions

The core changes (Issue reference guidelines) are valuable and well-documented. The Claude Code configuration provides useful automation hooks. The suggestions above are minor improvements that do not block merging.


🤖 Generated with Claude Code

@susumutomita
susumutomita enabled auto-merge (squash) November 18, 2025 23:27
@susumutomita
susumutomita merged commit fb5dcc7 into main Nov 18, 2025
6 of 7 checks passed
@susumutomita
susumutomita deleted the docs/update-issue-reference-guidelines branch November 18, 2025 23:27

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
.claude/developers/susumutomita.md (1)

3-3: Format email as inline code to avoid bare URL lint warning.

The email should be wrapped in backticks or formatted as a mailto link to satisfy markdown linting rules.

-**Email**: oyster880@gmail.com
+**Email**: `oyster880@gmail.com`
CLAUDE.md (1)

498-502: Consolidate duplicate Issue reference rules to reduce maintenance burden.

The "Issue 引用のルール" guidance appears in two locations: after the Git rebase/push section (lines 498–501) and again in the PR creation section (lines 520–524). This duplication risks divergence during future updates.

Consider moving the rule to a dedicated "Guidelines & Best Practices" section at the top of the development guidelines, then referencing it from both locations, or keeping only one primary location and referencing it from the other.

Example structure:

## Issue & Reference Guidelines

### Issue 引用のルール
- ...rule content here...

## Git ワークフロー
... references the guidelines above ...

## プルリクエスト作成
... references the guidelines above ...

Also applies to: 520-524

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47ab806 and ce3fa8d.

📒 Files selected for processing (4)
  • .claude/commands/suggest-claude-md.md (1 hunks)
  • .claude/developers/susumutomita.md (1 hunks)
  • .claude/settings.json (1 hunks)
  • CLAUDE.md (2 hunks)
🧰 Additional context used
🪛 GitHub Actions: ci
CLAUDE.md

[error] 501-501: textlint: ja-spacing/ja-space-between-half-and-full-width violation at line 501: 原則として、全角文字と半角文字の間にスペースを入れます。

🪛 markdownlint-cli2 (0.18.1)
.claude/developers/susumutomita.md

3-3: Bare URL used

(MD034, no-bare-urls)


57-57: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


62-62: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


67-67: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: claude-review
🔇 Additional comments (5)
.claude/developers/susumutomita.md (1)

1-70: Template structure is well-organized.

The developer profile template follows a logical structure with appropriate sections for coding style, tools, design patterns, and personal preferences. This will serve as a useful baseline for documenting developer profiles across the team.

CLAUDE.md (1)

279-631: Comprehensive Claude development playbook is well-structured.

The addition of the Claude agent development playbook provides clear guidance on TDD, Plan.md operations, CI validation, and self-review protocols. This establishes a strong foundation for autonomous development workflows and aligns well with the new command and hook infrastructure.

.claude/commands/suggest-claude-md.md (2)

1-95: Well-designed command specification with clear trigger conditions and output requirements.

The suggest-claude-md command provides a structured approach to identifying project-specific patterns and proposing CLAUDE.md updates. The three trigger conditions (project rules, repeated patterns, cross-sectional consistency) are practical and cover common cases where documentation should be updated.

The mandatory output format and explicit prohibitions help maintain consistent, actionable proposals without noise.


54-76: Output format specification is strict and clear.

The prescribed format with mandatory boilerplate ("会話履歴を分析しました。") ensures consistency across proposals. This is a good practice for automation, though ensure that any implementation strictly adheres to this contract to avoid integration issues.

Verify that any implementation of this command produces output exactly matching the specified format, including the required opening phrase and prohibition of alternative formats.

.claude/settings.json (1)

1-24: Hook script verified—no action needed.

The script bin/suggest-claude-md-hook.sh exists in the repository and is properly referenced in the configuration. No issues found.

Comment on lines +55 to +68
## Anti-Patterns to Avoid

Things this developer particularly dislikes or avoids:
-

## Notes & Quirks

Personal preferences, habits, or unique approaches:
-

## Learning & Growth

Areas of interest, learning goals, or expertise:
-

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Replace setext-style headings with atx-style headings per markdownlint rules.

Lines 57, 62, and 67 use setext-style headings (underlined with dashes), which violates the MD003 rule that requires atx-style headings (#). Update these to be consistent with the rest of the document.

-Things this developer particularly dislikes or avoids:
--
+## Anti-Patterns to Avoid (Details)
+
+Things this developer particularly dislikes or avoids:

-Personal preferences, habits, or unique approaches:
--
+## Notes & Quirks (Details)
+
+Personal preferences, habits, or unique approaches:

-Areas of interest, learning goals, or expertise:
--
+## Learning & Growth (Details)
+
+Areas of interest, learning goals, or expertise:

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

57-57: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


62-62: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


67-67: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

🤖 Prompt for AI Agents
In .claude/developers/susumutomita.md around lines 55 to 68, three setext-style
headings (lines 57, 62, 67) use underlines with dashes; replace each with an
atx-style heading by prepending the appropriate number of # characters (e.g.,
"## ") followed by a single space and the heading text, so "Anti-Patterns to
Avoid", "Notes & Quirks", and "Learning & Growth" become consistent atx headings
with the rest of the document.

Comment thread CLAUDE.md
susumutomita added a commit that referenced this pull request Jun 5, 2026
Advances the problems/ submodule to TenkaCloudChallenge cddf412, which
includes #47 (Flow Log LogFormat fields escaped so the platform
check-template-cfn-refs scanner reports zero unresolved refs).

Bumps the check-template-cfn-refs smoke-test count 7 -> 112 to match the
catalog after the 105-problem AWS certification drill set (#46).

Relates susumutomita/TenkaCloudChallenge#45
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