Skip to content

docs: README.md/CLAUDE.md の更新、英語化、テスト追記 - #9

Merged
nanasess merged 8 commits into
mainfrom
docs/update-readme-and-claude-md
Apr 1, 2026
Merged

docs: README.md/CLAUDE.md の更新、英語化、テスト追記#9
nanasess merged 8 commits into
mainfrom
docs/update-readme-and-claude-md

Conversation

@nanasess

@nanasess nanasess commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • README.md と CLAUDE.md を最新の実装(checkout, pull, install --skills コマンド等)に合わせて更新
  • ソースコード・コメント・出力メッセージ・テスト記述を英語に統一(CLAUDE.md は日本語のまま)
  • Worktree Context テンプレートを英語化
  • bats-core によるテスト実行方法を README.md / CLAUDE.md に追記
  • lib/common.sh の動作確認セクションを task_dir 内での docker compose 実行に修正

Changes

  • worktree, lib/*.sh: 全コメント・ヘルプテキスト・ログ出力を英語化
  • lib/common.sh: Worktree Context テンプレートを英語化、サマリ表示を "Summary" に変更
  • test/*.bats: テスト名を英語化、出力マッチ文字列を英語に更新
  • README.md: Testing セクション追加
  • CLAUDE.md: テストセクション追加

Test plan

  • ./test/bats/bin/bats test/single_repo.bats 全12テストパス
  • ./test/bats/bin/bats test/multi_repo.bats 全11テストパス
  • GitHub Actions CI が通ることを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • 新機能

    • ブランチ切り替え(worktree checkout)、リポジトリ更新(worktree pull)、スキルインストール(worktree install --skills)に対応
  • ドキュメント

    • すべてのヘルプテキストとエラーメッセージを英語に統一
    • CLAUDE.mdの自動生成とコンテキスト情報を記載
    • Batsテストの実行方法をドキュメント化
  • テスト

    • テスト説明を英語に更新

nanasess and others added 4 commits April 1, 2026 12:53
checkout, pull, install --skills コマンドの追加、.worktrees/ 内からの実行対応、
CLAUDE.md Worktree Context 生成についてドキュメントを更新。
また、worktree context の動作確認セクションを task_dir 内での docker compose
実行に修正。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLAUDE.md 以外の全ファイル(worktree, lib/, test/)のコメント、
ヘルプテキスト、ログ出力、テスト記述を英語に統一。
Worktree Context テンプレートも英語化。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
📝 Walkthrough

ウォークスルー

このプルリクエストは、git-worktree-managerプロジェクト全体のユーザー向けテキストとドキュメントを日本語から英語に翻訳します。コマンドの説明、エラーメッセージ、ログ出力、テスト説明、設定ドキュメントを更新しており、基盤となる制御フローや機能ロジックに変更はありません。

変更点

コホート / ファイル(s) 概要
ドキュメント
CLAUDE.md, README.md
コマンド仕様、使用例、テスト手順を日本語から英語に翻訳。新機能(worktree checkoutworktree pullworktree install --skills)の説明を追加し、環境変数とBatsテストの実行方法を明記。
コマンド実装
lib/cmd_checkout.sh, lib/cmd_cleanup.sh, lib/cmd_create.sh, lib/cmd_install.sh, lib/cmd_list.sh, lib/cmd_pull.sh
使用方法、オプション説明、エラーメッセージ、ログ出力をすべて日本語から英語に翻訳。制御フローと機能ロジックは変更なし。
共通ユーティリティ
lib/common.sh, lib/deps.sh, lib/detect.sh
コメント、エラーメッセージ、ログ出力テキストを日本語から英語に翻訳。サマリー表示やパッケージマネージャーの進捗メッセージを更新。基本的な関数ロジックは変更なし。
CLIエントリーポイント
worktree
トップレベルのヘルプテキスト、コマンド説明、不明なコマンドエラーメッセージを日本語から英語に翻訳。コマンドディスパッチロジックは変更なし。
テスト
test/single_repo.bats, test/multi_repo.bats
Batsテストのケース説明と出力期待値を日本語から英語に翻訳。テストロジックや実行コマンドは変更なし。

推定コードレビュー工数

🎯 1 (Trivial) | ⏱️ ~4 minutes

関連の可能性があるPR

ポエム

🐰 文字列たちを英語に変えて、
機能そのままにメッセージ新た、
ホップステップで翻訳完了、
ウサギも納得、すっきり爽快!🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.97% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive PR タイトルは日本語で記述されており、実際の変更内容(ドキュメント更新と英語化)と大まかに一致していますが、具体的な変更内容は不明確です。 タイトルを英語で、より具体的な変更内容を反映した形に変更することを推奨します。例:「Englishify documentation and add test instructions」
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/update-readme-and-claude-md

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

❤️ Share

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

Specify that all content except CLAUDE.md must be written in English,
including source code, commit messages, PRs, issues, and tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request primarily focuses on localizing the project by translating Japanese comments, logs, and documentation into English. It also introduces new commands like worktree checkout, worktree pull, and worktree install --skills, and adds a testing framework using bats-core. Several critical issues were identified in the shell scripts regarding pipe handling under set -e and set -o pipefail, where commands like head could cause the script to exit prematurely due to SIGPIPE. Additionally, improvements were suggested for safer worktree removal and more robust string matching when checking merged branches.

Comment thread lib/cmd_create.sh Outdated
Comment thread lib/cmd_list.sh Outdated
Comment thread lib/cmd_cleanup.sh Outdated
Comment thread lib/cmd_cleanup.sh Outdated
nanasess and others added 2 commits April 1, 2026 14:23
Add missing skills for worktree-checkout and worktree-pull commands.
Update worktree-create skill to document single-repo support and
worktree layout for both single and multi-repo projects.
Update install command to list all 5 available skills.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document that tests, README.md, CLAUDE.md, and skills must all be
updated whenever a command is added or modified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/cmd_create.sh (1)

28-34: ⚠️ Potential issue | 🟠 Major

--branch-prefix の値未指定で set -u クラッシュします

Line 32-33 で shift 後に $1 を無条件参照しているため、worktree create foo --branch-prefix のような入力で「引数不足」ではなく異常終了になります。明示的に検証して return 1 してください。

修正案(diff)
         case "$1" in
             --branch-prefix)
                 shift
+                if [ $# -eq 0 ] || [[ "$1" == -* ]]; then
+                    log_error "--branch-prefix requires a value"
+                    cmd_create_usage
+                    return 1
+                fi
                 branch_prefix="$1"
                 ;;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/cmd_create.sh` around lines 28 - 34, In the option-parsing case for
--branch-prefix (inside the while [ $# -gt 0 ] loop and case), you're shifting
then unconditionally reading $1 which triggers a crash under set -u when the
value is missing; after the shift for --branch-prefix, explicitly check that $#
-gt 0 (or that $1 is non-empty), emit an error message and return 1 if the value
is missing, otherwise assign branch_prefix="$1" and continue. Ensure you
reference the --branch-prefix branch, the shift, and the branch_prefix variable
in your fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@lib/cmd_create.sh`:
- Around line 28-34: In the option-parsing case for --branch-prefix (inside the
while [ $# -gt 0 ] loop and case), you're shifting then unconditionally reading
$1 which triggers a crash under set -u when the value is missing; after the
shift for --branch-prefix, explicitly check that $# -gt 0 (or that $1 is
non-empty), emit an error message and return 1 if the value is missing,
otherwise assign branch_prefix="$1" and continue. Ensure you reference the
--branch-prefix branch, the shift, and the branch_prefix variable in your fix.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a9ceff2a-5571-45e9-922e-3119373179d8

📥 Commits

Reviewing files that changed from the base of the PR and between e3fcba3 and 2cb0153.

📒 Files selected for processing (14)
  • CLAUDE.md
  • README.md
  • lib/cmd_checkout.sh
  • lib/cmd_cleanup.sh
  • lib/cmd_create.sh
  • lib/cmd_install.sh
  • lib/cmd_list.sh
  • lib/cmd_pull.sh
  • lib/common.sh
  • lib/deps.sh
  • lib/detect.sh
  • test/multi_repo.bats
  • test/single_repo.bats
  • worktree

- cmd_create.sh: Use PIPESTATUS to check git fetch exit code,
  tolerating SIGPIPE (141) from head truncation
- cmd_list.sh: Use PIPESTATUS for git ls-files | head pipe,
  tolerating SIGPIPE instead of relying on subshell || true
- cmd_cleanup.sh: Add -F flag to grep for fixed-string branch
  matching, avoiding regex metacharacter issues in branch names
- cmd_cleanup.sh: Skip rm -rf of task directory when any worktree
  removal failed, preventing inconsistent git state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nanasess
nanasess merged commit 0569877 into main Apr 1, 2026
3 checks passed
@nanasess
nanasess deleted the docs/update-readme-and-claude-md branch April 1, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant