実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

実装後レビュー(RV)ループの導入 - #569

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop
Aug 1, 2026
Merged

実装後レビュー(RV)ループの導入#569
yusuke0610 merged 3 commits into
mainfrom
feat/rv-review-loop

Conversation

@yusuke0610

@yusuke0610yusuke0610 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

概要

make ci 通過後・stage 直前に差分ベースのレビューを挟み、指摘ゼロまたは最大 3 周まで「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。

現状は lint / test が通った時点で人間のエディタ確認へ渡しており、「設計として妥当か」「契約を壊していないか」を機械的に見る工程が無い。指摘の発見が PR 後の CodeRabbit まで遅れる(PR #568 で ADR の記述漏れ・CI の検知漏れが後段で発覚した)。

変更内容

ファイル内容
.claude/skills/RV/SKILL.md(新規)手順の正本。レビュー対象の確定・修正ポリシー・ループ制御・レポート形式
.claude/rules/common/review.md(新規)レビュー観点と重大度の正本。正しさ / 契約 / SSoT / ルール違反 / テスト随伴。末尾に「観点の追記」ルール
.claude/CLAUDE.md「実装後レビュー(RV)」節を新設。stage 行を 実装 → make ci → RV ループ → git add に更新。判断が必要な事案に「RV で自動修正しなかった指摘」を追加
.claude/rules/common/tdd.md合流先フローを make ci → RV → stage に更新

設計

  • 観点は rule 側が正本、skill は手順のみ。RV / PR レビューで既存観点に無い指摘が出たら review.md に 1 行追記して育てる(コード修正だけで終わらせない)
  • 終了条件: (a) High/Medium ゼロ (b) 3 周到達 (c) 同一指摘が 2 周連続で未解消。(b)(c) では未解決指摘を列挙してユーザー判断を仰ぎ、stage へ進まない
  • 自動修正しないもの: 設計判断を伴う指摘・差分範囲を逸脱する指摘(CLAUDE.md「pr 後の追従」と同じ線引き)
  • hook は追加しない: hook はコマンド実行のみで、レビュー → 判断 → 修正のループは回せない
  • /code-review は Claude から起動できない(組み込み CLI コマンド)ため、差分レビューの手順は skill が内包する。手動併用は可
  • ADR は起票しない: 技術選定ではなく開発プロセスの運用ルールのため(既存の *_refacter skill 群も ADR 無しで導入)。必須ゲート化に進める段階で ADR-0019 と同じ扱いを検討

検証

RV 自身の導入差分に RV を回して受け入れ確認を行った(レポートは report/ 配下・gitignore 済み)。

#内容結果
1現差分で 1 周・レポート生成・ターミナルは要約のみpass
2違反注入(except ValueError: passsort_utils.py へ)→ 検出 → 解消pass(lint-tdd fail を High、例外の握りつぶしを Medium で検出。撤去済み)
3差分ゼロで即終了pass(origin/main の clean worktree で検出コマンド全空)
4同一指摘が 2 周連続未解消 → 打ち切り(条件 c)pass(無効な修正を 2 周当てて残存を確認 → 打ち切り)
5stage 行に RV が入るpass
6make ci(lint-adr-index / lint-env-keys / lint-tdd 含む)pass

RV が実際に検出した指摘(Round 1・Medium 2 件)は本 PR に反映済み:

  • rules/common/tdd.md のフロー記述が RV 挿入に追従せず、TDD 経路だけ RV を飛ばす読みになっていた
  • モデル切り替えルールが「make ci green で Haiku へ」のままで、RV ループ中の修正を Haiku で回す動線になっていた(→ 表・案内タイミング・制約を RV 完了後に修正)

この 2 件から review.md の SSoT カテゴリに「手順・フローを変えたら、それを記述している他の docs / rules も同じ差分で更新する」を追記している。

影響範囲

.claude/ 配下のみ。アプリケーションコード・CI 定義の変更なし。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • レビュー観点、重大度分類、確認項目を共通ルールとして整理しました。
    • レビュー結果や未解決事項の記録・報告手順を追加しました。
  • 開発プロセス
    • CI 実行後からステージング前までのレビュー手順を標準化しました。
    • 指摘対応と再レビューの流れを明確化し、最大3回までのレビューサイクルに対応しました。

make ci 通過後・stage 直前に差分レビューを挟み、指摘ゼロまたは 3 周まで
「レビュー → 修正 → make ci → 再レビュー」を回す運用を追加する。
PR 後の CodeRabbit まで指摘の発見が遅れるのを防ぐ。
- .claude/skills/RV/SKILL.md: 手順の正本(対象確定・ループ制御・レポート形式)
- .claude/rules/common/review.md: レビュー観点と重大度の正本。指摘が出たら
観点を 1 行追記して育てる運用を明記
- .claude/CLAUDE.md: stage フローへ RV を組み込み、観点 rule への導線を追加。
RV ループ中の修正は実装フェーズのため、モデル切り替えを RV 完了後に修正
- .claude/rules/common/tdd.md: 合流先フローを make ci → RV → stage に更新
hook は追加しない(レビュー→判断→修正のループは hook では回せないため)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added the documentation Improvements or additions to documentation label Aug 1, 2026
@coderabbitai

coderabbitaiBot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a8e9c16-83db-41a5-a54c-cbf4c0ab97c0

📥 Commits

Reviewing files that changed from the base of the PR and between 531d7e1 and a126302.

📒 Files selected for processing (2)
  • .claude/CLAUDE.md
  • .claude/skills/RV/SKILL.md
📝 Walkthrough

Walkthrough

The change adds shared review rules and a new /RV skill. The workflow now runs make ci, /RV, and then stage. RV findings, fixes, validation, reports, and model-switch conditions are defined.

Changes

RV review workflow

Layer / File(s)Summary
Shared review contract
.claude/CLAUDE.md, .claude/rules/common/review.md
The repository defines shared review criteria, severity handling, correction limits, and feedback updates.
RV review loop
.claude/skills/RV/SKILL.md
RV reviews the combined diff scope, applies severity-based fixes, runs up to three rounds with CI validation, records reports, and stops for unresolved decisions.
TDD and staging integration
.claude/CLAUDE.md, .claude/rules/common/tdd.md
The workflow runs RV after CI and before staging. It reports unresolved findings and delays the Haiku switch until RV completes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Developer
participant RV as RV skill
participant Diff as Git diff scope
participant Rules as review.md
participant CI as make ci
participant Stage as stage
Developer->>RV: Start post-implementation review
RV->>Diff: Discover committed, staged, and unstaged changes
RV->>Rules: Apply review criteria and severity policies
RV->>CI: Validate fixes after each review round
RV-->>Developer: Report findings, fixes, verdict, and next action
Developer->>Stage: Stage changes after RV completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ Passedタイトルは、実装後レビュー(RV)ループの導入というプルリクエストの主な変更内容を明確に示しています。
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rv-review-loop

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.

@coderabbitaicoderabbitaiBot 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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/CLAUDE.md:
- Line 112: Update the `make ci` description near the `/RV` guidance in
`.claude/CLAUDE.md` to state that it verifies lint, test, and build-web success,
while not evaluating design validity or contract preservation. Keep the
instruction to run `/RV` before staging.
In @.claude/skills/RV/SKILL.md:
- Around line 24-34: RV の対象確定処理に git ls-files --others --exclude-standard
を追加し、未追跡ファイルを内容・行数付きでレビュー対象集合へ含めてください。対象件数と「対象: N files / +X -Y
lines」集計にも反映し、差分がない場合の即終了条件を維持してください。SKILL.md 内の出力形式説明も未追跡ファイルを含む表現へ更新してください。
- Around line 62-68: SKILL.md の終了条件 (c) を、同一指摘全般ではなく未解決の High / Medium 指摘が 2
周連続で解消しない場合に限定するよう更新してください。Low 指摘は打ち切り判定から除外し、Round の記録にのみ残す既存方針を維持してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 324583d6-fce9-4115-aa60-6a87442edfc0

📥 Commits

Reviewing files that changed from the base of the PR and between 25c2067 and 531d7e1.

📒 Files selected for processing (4)
  • .claude/CLAUDE.md
  • .claude/rules/common/review.md
  • .claude/rules/common/tdd.md
  • .claude/skills/RV/SKILL.md

Comment thread.claude/CLAUDE.md Outdated
Comment thread.claude/skills/RV/SKILL.md Outdated
Comment thread.claude/skills/RV/SKILL.md
yusuke0610and others added 2 commits August 2, 2026 00:28
CodeRabbit の指摘(PR #569)を反映する。
- RV は git add 前に走るため、git diff 系では新規ファイルが対象から漏れる。
未追跡ファイル(git status --porcelain)を対象の和集合に追加する
- 終了条件 (c) が重大度を限定しておらず、記録のみで意図的に残る Low が
2 周続くと High/Medium の処理中でも打ち切られる。High/Medium に限定する
- make ci の説明を実際のターゲット内容(lint + test + build-web)に合わせる
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CodeRabbit の追加指摘(PR #569)を反映する。
git status --porcelain は新規ディレクトリを "?? path/" に畳むため、中の
個別ファイルがレビュー対象から漏れる(本 PR の .claude/skills/RV/ が該当)。
git ls-files --others --exclude-standard でファイル単位に列挙する。
- 未追跡ファイルの行数は wc -l で数えて +X に合算する旨を明記
- 対象サマリの書式を「N files(うち新規 M)/ +X -Y」に更新(レポート冒頭も同様)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yusuke0610
yusuke0610 merged commit 6714fe3 into mainAug 1, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yusuke0610