feat: 品質チェックコマンドのドキュメントを追加 - #69
Conversation
- check-coverageコマンドの追加 - fix-ciコマンドの追加 - pr-createコマンドの追加 - quality-checkコマンドの追加 - test-allコマンドの追加 - update-depsコマンドの追加 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@keito4 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 40 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughSeveral new markdown documents were added to the Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant CommandsDoc
participant CI
participant Repo
Developer->>CommandsDoc: Consults procedure (e.g., check-coverage, fix-ci)
Developer->>Repo: Runs prescribed commands (tests, lint, audit, etc.)
Repo-->>Developer: Returns results (coverage, errors, etc.)
Developer->>CI: Pushes changes/fixes
CI-->>Developer: Reports status (pass/fail)
Developer->>CommandsDoc: Follows troubleshooting or reporting steps if needed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (11)
.claude/commands/init-project.md (1)
11-13: Consider clarifying “features” discovery & version-pinningStating “プロジェクト特有のfeaturesを追加” is helpful, but newcomers may not know where to find the Dev Container features registry or how to pin a specific version (e.g.
"ghcr.io/devcontainers/features/node:1.0.1").
A quick link or example would remove that friction..claude/commands/test-all.md (1)
16-18: Clean coverage artifacts before each test stageRunning unit → component → E2E with separate
--coverageflags may overwrite or erase the previous coverage data. Addingrm -rf coverage(ornyc --clean) before Step 2 and consolidating with--coverageDirectory ./coverage/unitetc. will guarantee thatnpm run coverage:reportcan merge correctly..claude/commands/quality-check.md (1)
32-46: Tighten vulnerability/SAST commands & performance
npm auditscans all deps including dev and is very noisy;npm audit --omit=dev --audit-level=high(ornpm audit --production) drastically reduces false positives.semgrep --config=autopulls the entire default ruleset each run and may be slow; consider vendoring a curated.semgrep.ymlto keep the signal high and runtime low, then reference it here..claude/commands/pr-create.md (2)
18-26: Default branch may bemain, notmasterSeveral hosted repos (including new GitHub projects) default to
main. Replacingorigin/masterwith$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')or simply documenting “main/master” avoids confusion.
55-57:gh pr createmulti-line body formatting & assignee syntax
- In most shells,
\ninside a quoted string won’t render real newlines. Use a heredoc or--body-file.--assignee @meis invalid; use--assignee $(gh api user --jq .login)or omit the@.Example:
gh pr create -t "feat: <summary>" \ -b "$(cat <<'EOF' Closes #<issue-number> ## 概要 ... EOF )".claude/commands/fix-ci.md (1)
58-60: Prefer cache-safe rebuild over deletingnode_modules
rm -rf node_modules package-lock.jsondiscards the lockfile and risks supply-chain drift. Usenpm ci --forceorpnpm install --frozen-lockfileto reproduce the exact dependency tree while clearing cache problems..claude/commands/check-coverage.md (3)
1-1: Use the exact slash-command as the H1 heading for consistencyAll other command docs in
.claude/commands/start their title with the actual slash command (e.g./test-all).
Aligning this file avoids small UX frictions when scanning the directory.-# check-coverage +# /check-coverage
5-6: Reflect all coverage thresholds in the “目的” sentenceThe “成功基準” section later introduces branch- and function-coverage targets, but the introduction only mentions line- and critical-path coverage. Stating all four KPIs up-front prevents readers from missing important constraints.
-テストカバレッジが全リポジトリ70%以上、クリティカルパス100%の基準を満たしているか確認する。カバレッジの詳細レポートを生成し、改善点を特定。 +テストカバレッジが「ライン70%以上・ブランチ60%以上・関数65%以上」、かつクリティカルパス100%という基準を満たしているか確認する。カバレッジの詳細レポートを生成し、改善点を特定。
30-39: Consider sourcing the critical-path list from a single JSON fileHard-coding the echo statements means two places to update if the path list changes (here and
.critical-paths.json).
A tiny refactor keeps the list DRY:-echo "クリティカルパス:" -echo "- 認証/認可関連機能" -echo "- 決済処理" -echo "- セキュリティ関連機能" -echo "- データの保存/削除処理" -echo "- エラーハンドリング" +# jq -r '.[]' .critical-paths.json | sed 's/^/- /'Readers immediately see the single source of truth and can maintain it in one place.
.claude/commands/update-deps.md (2)
79-80: Commit message: add a scope to follow the project’s Conventional Commits rulePast learnings specify the
<type>(<scope>): <subject>format.
Suggest adding adepsscope:-git commit -m "chore: 依存関係を更新し脆弱性を修正" +git commit -m "chore(deps): 依存関係を更新し脆弱性を修正"
110-112: Wrap the bare URL to satisfy markdownlint MD034Markdownlint flags naked URLs; convert to an inline link:
-npmレジストリの状態を確認: https://status.npmjs.org/ +npmレジストリの状態を確認: <https://status.npmjs.org/>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.claude/commands/check-coverage.md(1 hunks).claude/commands/fix-ci.md(1 hunks).claude/commands/init-project.md(2 hunks).claude/commands/pr-create.md(1 hunks).claude/commands/quality-check.md(1 hunks).claude/commands/test-all.md(1 hunks).claude/commands/update-deps.md(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: keito4/config#0
File: .cursor/rules/commit.cursorrules:0-0
Timestamp: 2025-06-25T06:37:26.200Z
Learning: Commit messages must follow the Conventional Commits format: <type>(<scope>): <subject>, where type can be feat, fix, docs, refactor, etc.
🪛 markdownlint-cli2 (0.17.2)
.claude/commands/update-deps.md
112-112: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (4)
.claude/commands/init-project.md (1)
61-62: Verify the necessity & security implications of mounting~/.gitconfig/~/.gitignore
~/.gitignoreis not picked up by Git unless it’s referenced viacore.excludesFile; consider mounting~/.gitignore_globalinstead or documenting the required git-config line.~/.gitconfigmay contain user tokens/credentials. If you keep the mount, note that credential helpers oruser.signingkeywill also propagate to the container, which could be undesirable on shared CI machines..claude/commands/quality-check.md (1)
55-60: Add automated exit codes for quality gatesThe success list is clear, but CI only fails if the underlying commands exit non-zero. Document flags such as:
npm run lint -- --max-warnings 0 npm audit --omit=dev --audit-level=highso that failures propagate automatically.
.claude/commands/pr-create.md (1)
37-39: Script name mismatch with other docsHere you call
npm run quality:check, but.claude/commands/quality-check.mdlabels the commandquality:report(Step 7). Align the script name to prevent copy-paste failures..claude/commands/fix-ci.md (1)
64-69: Usenpm audit fix --omit=devbefore--force
--forcecan silently introduce breaking major upgrades. Document runningnpm audit fix --omit=devfirst, and resort to--forceonly after reviewing changelogs.
| npm ci | ||
| npm run test:all | ||
| npm run quality:check | ||
| npm run build | ||
| ``` |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Package-manager inconsistency (pnpm vs npm)
Earlier docs recommend pnpm; this section uses npm ci. Mixing tools can create divergent lockfiles and caches. Standardise on one (or note both variants).
🤖 Prompt for AI Agents
In .claude/commands/fix-ci.md around lines 32 to 36, the commands use `npm ci`
while earlier documentation recommends `pnpm`, causing inconsistency. Update
this section to use `pnpm install` or the equivalent pnpm commands consistently,
or clearly note both npm and pnpm variants to avoid divergent lockfiles and
caches.
| ## 成功基準 | ||
|
|
||
| - ✅ すべてのテストがグリーン(Pass) | ||
| - ✅ 全体の行カバレッジが70%以上 | ||
| - ✅ クリティカルパスのカバレッジが100% | ||
| - ✅ カバレッジレポートが正常に生成される | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Document how the coverage thresholds are enforced in CI
You list “70 % overall / 100 % critical path” as success criteria, but nothing indicates the thresholds are codified (e.g. Jest coverageThreshold, Istanbul --check-coverage). Without automation the gate is manual and error-prone.
🤖 Prompt for AI Agents
In .claude/commands/test-all.md around lines 34 to 40, the document lists
coverage thresholds as success criteria but does not explain how these
thresholds are enforced automatically in CI. Add documentation describing the
specific configuration or commands used to enforce these coverage thresholds,
such as Jest's coverageThreshold settings or Istanbul's --check-coverage option,
to clarify how the coverage gate is automated and prevents manual errors.
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
commitlintのsubject-caseルールが日本語の文字を大文字として認識し、 エラーになる問題を修正しました。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- 日本語コミットメッセージでのsubject-caseエラーを回避する設定を明記 - Conventional Commitsの形式説明を追加 - 日本語での利用を前提とした推奨設定として記載 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.claude/commands/init-project.md (2)
11-13: Clarify what “features” means for first-time readersLine 11 uses “features” without prior definition. In the DevContainer context this refers to Dev Container Features from the
devcontainers/featuresregistry. Consider adding a short parenthetical note or a link so newcomers understand exactly what they are expected to add.
65-102: Add language identifier to Conventional Commits example blockmarkdownlint flags the fence at Line 89 because no language is specified (MD040).
Minimal fix:-``` +```gitcommitAny identifier (
gitcommit,console,plaintext) will satisfy the linter.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.claude/commands/init-project.md(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: keito4/config#0
File: .cursor/rules/commit.cursorrules:0-0
Timestamp: 2025-06-25T06:37:26.200Z
Learning: Commit messages must follow the Conventional Commits format: <type>(<scope>): <subject>, where type can be feat, fix, docs, refactor, etc.
📚 Learning: commit messages must follow the conventional commits format: (): , where type ...
Learnt from: CR
PR: keito4/config#0
File: .cursor/rules/commit.cursorrules:0-0
Timestamp: 2025-06-25T06:37:26.200Z
Learning: Commit messages must follow the Conventional Commits format: <type>(<scope>): <subject>, where type can be feat, fix, docs, refactor, etc.
Applied to files:
.claude/commands/init-project.md
🪛 markdownlint-cli2 (0.17.2)
.claude/commands/init-project.md
89-89: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (1)
.claude/commands/init-project.md (1)
61-64: Verify~/.gitignoremount pathGit’s global ignore file is usually named
~/.gitignore_global(or any filename configured viagit config --global core.excludesFile …). Mounting~/.gitignorewill have no effect unless users explicitly setcore.excludesFile=~/.gitignore.
Please confirm the intended filename or update the docs accordingly.
以下の設定を追加しました: - ESLint/Prettier設定 - Husky設定 - GitHub Actions CI設定 - package.jsonの推奨スクリプト - .gitignore推奨設定 - VSCode推奨設定 CLAUDE.mdの品質基準に準拠した開発環境構築をサポート 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
追加したコマンド
/check-coverage- テストカバレッジの確認/fix-ci- CI/CDエラーの修正/pr-create- プルリクエストの作成/quality-check- 品質ゲートチェック/test-all- 全テストの実行/update-deps- 依存関係の更新Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit