feat: 5観点コードレビューとレビュールール配布を既存コマンドに統合 - #655
Conversation
claude-code-harness のレビュー・セットアップ観点を導入: - /security-review を5観点レビュー(Security/Performance/Quality/Accessibility/AI Residuals)に刷新 - /setup-new-repo に .claude/rules/ 配布ステップを追加 - /pre-pr-checklist にコードレビュー観点チェックを追加 - /repo-maintenance にレビュールール存在確認ステップを追加 - .claude/rules/code-review-standards.md を新設(severity ベース verdict 基準) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a documented code-review standards framework (five perspectives and severity→verdict rules), integrates Changes
Sequence Diagram(s)sequenceDiagram
participant Maintainer
participant SetupScript
participant ConfigRepo
participant TargetRepo
Maintainer->>SetupScript: run setup-new-repo
SetupScript->>ConfigRepo: check for .claude/rules/* files
ConfigRepo-->>SetupScript: return rule files (or not)
alt rule files present
SetupScript->>TargetRepo: create .claude/rules/ and copy files
TargetRepo-->>SetupScript: ack
else missing in config
SetupScript->>Maintainer: report missing rules
end
Note right of SetupScript: repo-maintenance later\ncan detect diffs and (MODE=full) copy/update files
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.claude/commands/repo-maintenance.md (1)
2756-2756: サマリー項目に「差分あり」状態も明示した方がよいです。Line 2756 は missing のみで、3.3.1 の「configとの差分あり」を要約できません。運用上は drift の可視化も同列で必要です。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/repo-maintenance.md at line 2756, サマリー行("Code Review Rules: ✅ All rules configured (or ⚠️ Missing rules)" を生成している箇所)が「missing」だけを出力しており、3.3.1 の「configとの差分あり(drift)」を表現していないので、サマリー生成ロジックを修正して「差分あり(drift)」状態を追加表示するようにしてください;具体的には該当ロジックが参照する状態トークン("missing")に対して新たに "drift" または "difference" を判定・付与し、表示フォーマット(サマリー行文字列)に "差分あり" を含める実装(サマリー生成関数/テンプレートの更新)を行ってください。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/pre-pr-checklist.md:
- Around line 34-35: pre-pr checklist currently treats "critical / major" as
"警告+修正推奨", which conflicts with .claude/rules/code-review-standards.md that
defines critical/major as REQUEST_CHANGES; update the wording in
.claude/commands/pre-pr-checklist.md (the line containing "critical / major
の指摘があれば警告を表示し、PR作成前の修正を推奨する。") to match the standard by requiring a
REQUEST_CHANGES-level response (e.g. state 修正必須またはREQUEST_CHANGESとして取り扱う), so
both files use the same severity and action.
In @.claude/commands/repo-maintenance.md:
- Around line 623-633: The doc marks `.claude/rules/code-review-standards.md` as
required but it is missing from the Config Template Sync management list,
causing drift; update the Config Template Sync sections (the template management
list referenced around Line 2253-2255 and the template sync rules near Line 2294
onward) to include `.claude/rules/code-review-standards.md` so the file is both
validated and kept in sync, and ensure the README/sections that enumerate
required rule files match the sync list to prevent future mismatches.
- Around line 645-658: Replace the hard-coded placeholder and add the missing
checks: accept or derive the config repo path into CONFIG_REPO (e.g., from an
argument or GIT_CONFIG_REPO) and compute CUR_REPO="$(git rev-parse
--show-toplevel 2>/dev/null)"; if CONFIG_REPO is empty fail fast, and if
CONFIG_REPO == CUR_REPO skip (to exclude config repo itself). Then check for
REQUIRED_RULES under "${CONFIG_REPO}/${RULES_DIR}" (using RULES_DIR and
REQUIRED_RULES from the diff) and, if you need to only act on changed files, use
git -C "${CONFIG_REPO}" diff --name-only HEAD~1..HEAD (or a provided ref range)
to limit checks to changed rule files; emit clear warnings for missing files and
exit non-zero on fatal cases.
---
Nitpick comments:
In @.claude/commands/repo-maintenance.md:
- Line 2756: サマリー行("Code Review Rules: ✅ All rules configured (or ⚠️ Missing
rules)" を生成している箇所)が「missing」だけを出力しており、3.3.1
の「configとの差分あり(drift)」を表現していないので、サマリー生成ロジックを修正して「差分あり(drift)」状態を追加表示するようにしてください;具体的には該当ロジックが参照する状態トークン("missing")に対して新たに
"drift" または "difference" を判定・付与し、表示フォーマット(サマリー行文字列)に "差分あり"
を含める実装(サマリー生成関数/テンプレートの更新)を行ってください。
🪄 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
Run ID: 0e10a65b-5586-4321-81fa-71de377c785e
📒 Files selected for processing (5)
.claude/commands/pre-pr-checklist.md.claude/commands/repo-maintenance.md.claude/commands/setup-new-repo.md.claude/rules/code-review-standards.mdAGENTS.md
| ### 3.3.1 Code Review Rules Check | ||
|
|
||
| コードレビュー基準の設定状況を確認: | ||
|
|
||
| 実行内容: | ||
|
|
||
| - `.claude/rules/code-review-standards.md` の存在確認 | ||
| - `.claude/rules/development-standards.md` の存在確認 | ||
| - `.claude/rules/git-conventions.md` の存在確認 | ||
| - config リポジトリのルールファイルとの差分確認(config リポジトリ自身は除く) | ||
|
|
There was a problem hiding this comment.
ルール検証対象と同期対象の不一致でドリフトが残ります。
このセクションでは code-review-standards.md を必須としている一方、同ファイルの Config Template Sync 管理対象(Line 2253-2255 / Line 2294 以降)に含まれていません。結果として「存在は確認するが更新追従しない」状態になります。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/repo-maintenance.md around lines 623 - 633, The doc marks
`.claude/rules/code-review-standards.md` as required but it is missing from the
Config Template Sync management list, causing drift; update the Config Template
Sync sections (the template management list referenced around Line 2253-2255 and
the template sync rules near Line 2294 onward) to include
`.claude/rules/code-review-standards.md` so the file is both validated and kept
in sync, and ensure the README/sections that enumerate required rule files match
the sync list to prevent future mismatches.
| ```bash | ||
| # config リポジトリのパスを取得(このリポジトリ自身なら SKIP) | ||
| CONFIG_REPO="$(git -C /path/to/config rev-parse --show-toplevel 2>/dev/null)" | ||
|
|
||
| # ルールファイルの存在確認 | ||
| RULES_DIR=".claude/rules" | ||
| REQUIRED_RULES=("code-review-standards.md" "development-standards.md" "git-conventions.md") | ||
|
|
||
| for rule in "${REQUIRED_RULES[@]}"; do | ||
| if [ ! -f "${RULES_DIR}/${rule}" ]; then | ||
| echo "⚠️ Missing: ${RULES_DIR}/${rule}" | ||
| fi | ||
| done | ||
| ``` |
There was a problem hiding this comment.
サンプルスクリプトが実行不能・仕様不足です。
Line 647 の /path/to/config はプレースホルダのままで、さらに記載済み要件(差分確認・config自身除外)がこのコード片で満たされていません。運用手順として誤実装を誘発します。
🔧 提案差分(実行可能な最小版)
-# config リポジトリのパスを取得(このリポジトリ自身なら SKIP)
-CONFIG_REPO="$(git -C /path/to/config rev-parse --show-toplevel 2>/dev/null)"
+# config リポジトリのパスを探索(このリポジトリ自身は SKIP)
+CONFIG_REPO=""
+for p in "$HOME/develop/github.com/keito4/config" "$HOME/ghq/github.com/keito4/config" "$HOME/src/github.com/keito4/config"; do
+ [ -d "$p/.claude/rules" ] && CONFIG_REPO="$p" && break
+done
+
+REPO_NAME=$(gh repo view --json nameWithOwner --jq '.nameWithOwner' 2>/dev/null || echo "")
+if [ "$REPO_NAME" = "keito4/config" ]; then
+ echo "⏭️ Skip rules diff check on config repository itself"
+else
+ for rule in "${REQUIRED_RULES[@]}"; do
+ if [ -f "${RULES_DIR}/${rule}" ] && [ -f "${CONFIG_REPO}/.claude/rules/${rule}" ]; then
+ diff -q "${CONFIG_REPO}/.claude/rules/${rule}" "${RULES_DIR}/${rule}" >/dev/null 2>&1 || \
+ echo "🔄 Diff detected: ${RULES_DIR}/${rule}"
+ fi
+ done
+fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```bash | |
| # config リポジトリのパスを取得(このリポジトリ自身なら SKIP) | |
| CONFIG_REPO="$(git -C /path/to/config rev-parse --show-toplevel 2>/dev/null)" | |
| # ルールファイルの存在確認 | |
| RULES_DIR=".claude/rules" | |
| REQUIRED_RULES=("code-review-standards.md" "development-standards.md" "git-conventions.md") | |
| for rule in "${REQUIRED_RULES[@]}"; do | |
| if [ ! -f "${RULES_DIR}/${rule}" ]; then | |
| echo "⚠️ Missing: ${RULES_DIR}/${rule}" | |
| fi | |
| done | |
| ``` | |
| # config リポジトリのパスを探索(このリポジトリ自身は SKIP) | |
| CONFIG_REPO="" | |
| for p in "$HOME/develop/github.com/keito4/config" "$HOME/ghq/github.com/keito4/config" "$HOME/src/github.com/keito4/config"; do | |
| [ -d "$p/.claude/rules" ] && CONFIG_REPO="$p" && break | |
| done | |
| REPO_NAME=$(gh repo view --json nameWithOwner --jq '.nameWithOwner' 2>/dev/null || echo "") | |
| if [ "$REPO_NAME" = "keito4/config" ]; then | |
| echo "⏭️ Skip rules diff check on config repository itself" | |
| else | |
| for rule in "${REQUIRED_RULES[@]}"; do | |
| if [ -f "${RULES_DIR}/${rule}" ] && [ -f "${CONFIG_REPO}/.claude/rules/${rule}" ]; then | |
| diff -q "${CONFIG_REPO}/.claude/rules/${rule}" "${RULES_DIR}/${rule}" >/dev/null 2>&1 || \ | |
| echo "🔄 Diff detected: ${RULES_DIR}/${rule}" | |
| fi | |
| done | |
| fi | |
| # ルールファイルの存在確認 | |
| RULES_DIR=".claude/rules" | |
| REQUIRED_RULES=("code-review-standards.md" "development-standards.md" "git-conventions.md") | |
| for rule in "${REQUIRED_RULES[@]}"; do | |
| if [ ! -f "${RULES_DIR}/${rule}" ]; then | |
| echo "⚠️ Missing: ${RULES_DIR}/${rule}" | |
| fi | |
| done |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/repo-maintenance.md around lines 645 - 658, Replace the
hard-coded placeholder and add the missing checks: accept or derive the config
repo path into CONFIG_REPO (e.g., from an argument or GIT_CONFIG_REPO) and
compute CUR_REPO="$(git rev-parse --show-toplevel 2>/dev/null)"; if CONFIG_REPO
is empty fail fast, and if CONFIG_REPO == CUR_REPO skip (to exclude config repo
itself). Then check for REQUIRED_RULES under "${CONFIG_REPO}/${RULES_DIR}"
(using RULES_DIR and REQUIRED_RULES from the diff) and, if you need to only act
on changed files, use git -C "${CONFIG_REPO}" diff --name-only HEAD~1..HEAD (or
a provided ref range) to limit checks to changed rule files; emit clear warnings
for missing files and exit non-zero on fatal cases.
|
PR 655 コードレビュー: 5観点レビュー統合 総合評価: REQUEST_CHANGES 概念・方向性は良好ですが、必須対応が1点あります。 Critical / Major
PR説明・コミットメッセージでは /security-review を5観点レビューに全面刷新と記載されているが、.claude/commands/security-review.md の内容は変更されていない。現在の内容はまだ「このコードを10個の改善案を出してください。」の1行のみ。security-review.md を5観点ベースの内容に更新するか、スコープ外であれば PR 説明を修正する必要がある。 Minor
テストファイル・devcontainer 設定・ローカル開発スクリプトでは正当な値であり、major にするとノイズが多くなる。minor に下げるか、テスト・設定ファイル以外での本番コードでの localhost ハードコードに条件を絞ることを提案。
既知のflaky testや調査中の問題で意図的にスキップされることがある。minor に変更し「スキップする場合は必ずコメントで理由を明記する」というルールを添えるほうが実用的。
bash スニペット内の git -C /path/to/config は実際の動作手順として誤解される恐れがある。擬似コードであることを明示するか、環境変数での取得方法を示す。 Recommendation
8.1.5 は直感的でない。8.2 として繰り上げる(現行の 8.2 を 8.3 にリナンバー)方がわかりやすい。
Accessibility 観点はフロントエンド/HTML に限定されるが paths [**/*] で全ファイルに適用される。バックエンド専用リポジトリへの配布時に混乱を招く可能性があるため、UI/フロントエンドコードに限り適用と注記を推奨。 良い点
必須対応: security-review.md 未更新の解消(ファイル更新 or PR説明の修正) Reviewed with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e488b2490
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - 不足ルールを config リポジトリからコピー | ||
| - 差分があるファイルについて更新を提案 |
There was a problem hiding this comment.
Include code-review standards in maintenance rule sync
This section says full mode will copy missing review rules, but the command’s executable sync list (MANAGED_FILES in the same file around lines 2294–2304) does not include .claude/rules/code-review-standards.md. That means /repo-maintenance can claim to manage review rules while never actually propagating the new standards file to existing repositories.
Useful? React with 👍 / 👎.
| | `/repo-maintenance` | Comprehensive repository maintenance - run all health checks and updates | | ||
| | `/security-credential-scan` | (no description) | | ||
| | `/security-review` | (no description) | | ||
| | `/security-review` | 5観点コードレビュー(Security / Performance / Quality / Accessibility / AI Residuals) | |
There was a problem hiding this comment.
Align /security-review description with real command behavior
The command table now advertises /security-review as a 5-perspective review workflow, but .claude/commands/security-review.md is still a single-line prompt asking for “10 improvements.” This mismatch will mislead users/agents into expecting severity-based review output that the command does not currently implement.
Useful? React with 👍 / 👎.
|
(aside) |
|
Claude finished @keito4's task in 8m 53s —— View job 修正完了 ✅
原因:
変更内容
|
- security-review.md: 「10個の改善案」から5観点レビューに全面刷新 Security/Performance/Quality/Accessibility/AI Residuals + severity判定 - pre-pr-checklist.md: critical/majorをREQUEST_CHANGES相当として扱うよう修正 code-review-standards.mdとの文言不一致を解消 Co-authored-by: keito4 <keito4@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/pre-pr-checklist.md:
- Around line 24-35: The doc claims /pre-pr-checklist runs a 5-point automated
review, but script/pre-pr-checklist.sh (lines ~45-122) doesn't implement those
checks; update either by (A) implementing the missing automated checks in
script/pre-pr-checklist.sh (add functions to perform Security, Performance,
Quality, Accessibility, and AI Residuals checks and ensure /pre-pr-checklist
outputs their results) or (B) change .claude/commands/pre-pr-checklist.md (the
text around the current /pre-pr-checklist references at lines 24-35 and 71-78)
to explicitly state these are manual review items/manual checklist until
automation is added; pick one approach, keep messages and headings consistent
(use the “5観点” terminology), and ensure /pre-pr-checklist and
script/pre-pr-checklist.sh are aligned after the change.
In @.claude/commands/security-review.md:
- Around line 28-31: The Markdown fenced code block starting with "```" followed
by "## [観点名]" needs a language tag to satisfy markdownlint MD040; change the
opening fence to include a safe language token like "text" (i.e., replace the
opening ``` with ```text) so the block reads as a text-language fenced code
block and leave the closing ``` unchanged; you can locate the block by the
content "## [観点名]" inside .claude/commands/security-review.md.
🪄 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
Run ID: 15f22a2b-e984-4d3a-bdef-2cd59bb69789
📒 Files selected for processing (2)
.claude/commands/pre-pr-checklist.md.claude/commands/security-review.md
| ### Code Review (5観点) | ||
|
|
||
| 差分に対して以下の5観点でクイックレビューを実施する: | ||
|
|
||
| 1. **Security**: 機密情報露出、インジェクション、認証漏れ | ||
| 2. **Performance**: N+1クエリ、メモリリーク、不要な再レンダリング | ||
| 3. **Quality**: 命名、単一責任、テストカバレッジ、エラーハンドリング | ||
| 4. **Accessibility**: ARIA属性、キーボードナビ、セマンティックHTML | ||
| 5. **AI Residuals**: `it.skip`、`localhost`ハードコード、`TODO`/`FIXME`残骸、仮実装 | ||
|
|
||
| critical / major の指摘があれば REQUEST_CHANGES 相当として扱い、PR作成前に修正必須とする。 | ||
| minor / recommendation のみなら APPROVE 相当として通過。 |
There was a problem hiding this comment.
仕様記述と実装が乖離しています(5観点レビュー未実装)。
Line 24-35 と Line 71-78 では /pre-pr-checklist が5観点レビューを実行・表示する前提ですが、script/pre-pr-checklist.sh:45-122 には該当処理がなく、現状は Quality Checks / PR Analysis / Branch Status のみです。ユーザーに誤った期待を与えるため、(1) スクリプト実装を追加するか、実装完了まで (2) 本ドキュメントを「手動レビュー項目」表現に落とす必要があります。
Also applies to: 71-78
🧰 Tools
🪛 LanguageTool
[grammar] ~34-~34: Ensure spelling is correct
Context: ...ritical / major の指摘があれば REQUEST_CHANGES 相当として扱い、PR作成前に修正必須とする。 minor / recommendation のみなら APPROVE 相当として通過。 ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/pre-pr-checklist.md around lines 24 - 35, The doc claims
/pre-pr-checklist runs a 5-point automated review, but
script/pre-pr-checklist.sh (lines ~45-122) doesn't implement those checks;
update either by (A) implementing the missing automated checks in
script/pre-pr-checklist.sh (add functions to perform Security, Performance,
Quality, Accessibility, and AI Residuals checks and ensure /pre-pr-checklist
outputs their results) or (B) change .claude/commands/pre-pr-checklist.md (the
text around the current /pre-pr-checklist references at lines 24-35 and 71-78)
to explicitly state these are manual review items/manual checklist until
automation is added; pick one approach, keep messages and headings consistent
(use the “5観点” terminology), and ensure /pre-pr-checklist and
script/pre-pr-checklist.sh are aligned after the change.
| ``` | ||
| ## [観点名] | ||
| - [severity] [指摘内容] (ファイル名:行番号) | ||
| ``` |
There was a problem hiding this comment.
Fenced code block に言語指定を付けてください。
Line 28 のコードフェンスは markdownlint (MD040) 的に text などの言語タグを付けるのが安全です。
🔧 Proposed fix
-```
+```text
## [観点名]
- [severity] [指摘内容] (ファイル名:行番号)</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 28-28: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/security-review.md around lines 28 - 31, The Markdown
fenced code block starting with "```" followed by "## [観点名]" needs a language
tag to satisfy markdownlint MD040; change the opening fence to include a safe
language token like "text" (i.e., replace the opening ``` with ```text) so the
block reads as a text-language fenced code block and leave the closing ```
unchanged; you can locate the block by the content "## [観点名]" inside
.claude/commands/security-review.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/security-review.md:
- Around line 125-149: The fenced output template block at the top of the
snippet is missing a language tag (causing MD040); update the opening fence for
the template block that wraps the "## Code Review Result" section to declare a
language (e.g., change the leading ``` to ```markdown) so the block is a proper
Markdown code fence and ensure the closing ``` remains present; locate the
template block by the "## Code Review Result" heading and adjust that fence
accordingly.
- Around line 45-50: Update the three unlabeled fenced code blocks that contain
the regex lists (the blocks starting with lines containing
"localhost|127\.0\.0\.1|0\.0\.0\.0", "mockData|dummyData|fakeData|testData", and
"temporary|placeholder|replace.later|workaround") by adding a language token
(e.g., text) immediately after each opening triple backtick so the fences read
```text; this will satisfy MD040 and keep CI green.
🪄 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
Run ID: e4c24847-ab6d-4519-bc92-a04f8dc4847e
📒 Files selected for processing (1)
.claude/commands/security-review.md
| ``` | ||
| localhost|127\.0\.0\.1|0\.0\.0\.0 # ローカルアドレス | ||
| it\.skip|describe\.skip|test\.skip # スキップされたテスト | ||
| PRIVATE_KEY|SECRET_KEY|PASSWORD= # ハードコードされた秘密情報候補 | ||
| staging\.|dev\.|sandbox\. # 環境固定 URL | ||
| ``` |
There was a problem hiding this comment.
Fenced code blocks need language tags (MD040).
Line 45, Line 54, and Line 61 use unlabeled fences. Add a language token (e.g. text) to satisfy markdownlint and keep CI stable.
🔧 Proposed fix
-```
+```text
localhost|127\.0\.0\.1|0\.0\.0\.0 # ローカルアドレス
it\.skip|describe\.skip|test\.skip # スキップされたテスト
PRIVATE_KEY|SECRET_KEY|PASSWORD= # ハードコードされた秘密情報候補
staging\.|dev\.|sandbox\. # 環境固定 URL@@
- +text
mockData|dummyData|fakeData|testData # テストデータ残骸
TODO|FIXME|HACK|XXX # 未対応マーカー
@@
-```
+```text
temporary|placeholder|replace.later|workaround # 仮実装コメント
</details>
Based on learnings: Fail on code formatting violations during code review.
Also applies to: 54-57, 61-63
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.0)</summary>
[warning] 45-45: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/security-review.md around lines 45 - 50, Update the three
unlabeled fenced code blocks that contain the regex lists (the blocks starting
with lines containing "localhost|127.0.0.1|0.0.0.0",
"mockData|dummyData|fakeData|testData", and
"temporary|placeholder|replace.later|workaround") by adding a language token
(e.g., text) immediately after each opening triple backtick so the fences read
| ``` | ||
| ## Code Review Result | ||
|
|
||
| **Verdict**: APPROVE / REQUEST_CHANGES | ||
|
|
||
| ### Summary | ||
| - Files reviewed: {N} | ||
| - Issues found: {critical}C / {major}M / {minor}m / {recommendation}R | ||
|
|
||
| ### Critical Issues | ||
| (critical があれば severity 順に表示) | ||
|
|
||
| ### Major Issues | ||
| (major があれば表示) | ||
|
|
||
| ### Observations | ||
| (minor / recommendation を表示) | ||
|
|
||
| | Severity | Category | Location | Issue | Suggestion | | ||
| |----------|----------|----------|-------|------------| | ||
| | minor | Quality | src/foo.ts:42 | ... | ... | | ||
|
|
||
| ### AI Residuals Summary | ||
| (Step 3 の検出結果サマリ) | ||
| ``` |
There was a problem hiding this comment.
Output template block should declare a fence language.
Line 125 should specify a language (markdown is appropriate) to resolve MD040.
🔧 Proposed fix
-```
+```markdown
## Code Review Result
**Verdict**: APPROVE / REQUEST_CHANGES
@@
### AI Residuals Summary
(Step 3 の検出結果サマリ)</details>
Based on learnings: Fail on code formatting violations during code review.
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 125-125: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/commands/security-review.md around lines 125 - 149, The fenced
output template block at the top of the snippet is missing a language tag
(causing MD040); update the opening fence for the template block that wraps the
"## Code Review Result" section to declare a language (e.g., change the leading
``` to ```markdown) so the block is a proper Markdown code fence and ensure the
closing ``` remains present; locate the template block by the "## Code Review
Result" heading and adjust that fence accordingly.
|
🎉 This PR is included in version 1.108.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
claude-code-harness のレビュー・セットアップ観点を既存コマンドに統合し、コードレビューの品質基準を標準化する。
Why
/security-reviewが「10個の改善案を出してください」の1行のみで実用性が低かったWhat
/security-review: 5観点レビュー(Security / Performance / Quality / Accessibility / AI Residuals)+ severity ベース verdict に全面刷新/setup-new-repo: Step 8.1.5 に.claude/rules/配布(code-review-standards, development-standards, git-conventions)を追加/pre-pr-checklist: Quality Checks と PR Analysis の間に5観点コードレビューセクションを追加/repo-maintenance: Step 3.3.1 にレビュールール存在確認・差分チェックを追加.claude/rules/code-review-standards.md: 5観点定義、severity 判定基準、AI Residuals 検出パターンを新設How to test
/security-reviewを実行し、5観点でレビュー結果が出力されることを確認/pre-pr-checklistを実行し、Code Review セクションが表示されることを確認/repo-maintenance --mode check-onlyを実行し、Code Review Rules チェックが含まれることを確認Checklist
Related
Ref: https://github.com/Chachamaru127/claude-code-harness
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores